Fixing boolean type introspection for Mysql in PHP 5.5

This commit is contained in:
Jose Lorenzo Rodriguez 2013-06-24 13:42:29 +02:00
parent df1e74765b
commit f6eac9a175

View file

@ -226,8 +226,8 @@ class Mysql extends DboSource {
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'];
}