From f6eac9a175ab9c97b0e0763971581702ae0a6b01 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Mon, 24 Jun 2013 13:42:29 +0200 Subject: [PATCH] Fixing boolean type introspection for Mysql in PHP 5.5 --- lib/Cake/Model/Datasource/Database/Mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 278379ae402..8a9ce6600fd 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -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']; }