Permalink
Browse files

More edge case handlignfor native_type in mysql for older versions of

php
  • Loading branch information...
1 parent b8bbf0b commit 489d1db7d11670df3c90aa44110713d2121267e6 @lorenzo lorenzo committed Jun 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Datasource/Database/Mysql.php
View
2 lib/Cake/Model/Datasource/Database/Mysql.php
@@ -229,7 +229,7 @@ public function resultSet($results) {
if ($column['len'] === 1 && (empty($column['native_type']) || $column['native_type'] === 'TINY')) {
$type = 'boolean';
} else {
- $type = $column['native_type'];
+ $type = empty($column['native_type']) ? 'string' : $column['native_type'];
}
if (!empty($column['table']) && strpos($column['name'], $this->virtualFieldSeparator) === false) {
$this->map[$index++] = array($column['table'], $column['name'], $type);

0 comments on commit 489d1db

Please sign in to comment.