Merge branch '2.0' of github.com:cakephp/cakephp into 2.0

This commit is contained in:
Jose Lorenzo Rodriguez 2011-09-03 14:31:02 -04:30
commit d24c408537

View file

@ -2639,11 +2639,10 @@ class DboSource extends DataSource {
* Gets the length of a database-native column description, or null if no length * Gets the length of a database-native column description, or null if no length
* *
* @param string $real Real database-layer column type (i.e. "varchar(255)") * @param string $real Real database-layer column type (i.e. "varchar(255)")
* @return mixed An integer or string representing the length of the column * @return mixed An integer or string representing the length of the column, or null for unknown length.
*/ */
public function length($real) { public function length($real) {
if (!preg_match_all('/([\w\s]+)(?:\((\d+)(?:,(\d+))?\))?(\sunsigned)?(\szerofill)?/', $real, $result)) { if (!preg_match_all('/([\w\s]+)(?:\((\d+)(?:,(\d+))?\))?(\sunsigned)?(\szerofill)?/', $real, $result)) {
trigger_error(__d('cake_dev', "FIXME: Can't parse field: " . $real), E_USER_WARNING);
$col = str_replace(array(')', 'unsigned'), '', $real); $col = str_replace(array(')', 'unsigned'), '', $real);
$limit = null; $limit = null;