Skip to content

Commit

Permalink
Removing trigger_warning() that causes tests to fail in Sqlite, as
Browse files Browse the repository at this point in the history
it does not assign lengths for integer columns.
  • Loading branch information
markstory committed Sep 3, 2011
1 parent 2ceea79 commit 4172eac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -2694,11 +2694,10 @@ public function hasAny($Model, $sql) {
* 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)")
* @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) {
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);
$limit = null;

Expand Down

0 comments on commit 4172eac

Please sign in to comment.