Skip to content

Commit

Permalink
Preventing notice in older versions of php
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 24, 2013
1 parent f6eac9a commit b8bbf0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Mysql.php
Expand Up @@ -226,7 +226,7 @@ public function resultSet($results) {

while ($numFields-- > 0) {
$column = $results->getColumnMeta($index);
if ($column['len'] === 1 && $column['native_type'] === 'TINY') {
if ($column['len'] === 1 && (empty($column['native_type']) || $column['native_type'] === 'TINY')) {
$type = 'boolean';
} else {
$type = $column['native_type'];
Expand Down

0 comments on commit b8bbf0b

Please sign in to comment.