Skip to content

Commit

Permalink
Fixing boolean type introspection for Mysql in PHP 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 24, 2013
1 parent df1e747 commit f6eac9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Model/Datasource/Database/Mysql.php
Expand Up @@ -226,8 +226,8 @@ public function resultSet($results) {

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

0 comments on commit f6eac9a

Please sign in to comment.