From 05acd91da8936c4e0846af25d8f3fc8b971aa469 Mon Sep 17 00:00:00 2001 From: adrive Date: Thu, 14 Feb 2008 13:27:48 +0000 Subject: [PATCH] Merge r3769 (fixed problem with convertBoolean in Pgsql) --- lib/Doctrine/Connection/Pgsql.php | 4 ++-- lib/Doctrine/Export.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Connection/Pgsql.php b/lib/Doctrine/Connection/Pgsql.php index f9c19d0c7..f43e79662 100644 --- a/lib/Doctrine/Connection/Pgsql.php +++ b/lib/Doctrine/Connection/Pgsql.php @@ -106,12 +106,12 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common { if (is_array($item)) { foreach ($item as $key => $value) { - if (is_bool($value)) { + if (is_bool($value) || is_numeric($item)) { $item[$key] = ($value) ? 'true' : 'false'; } } } else { - if (is_bool($item)) { + if (is_bool($item) || is_numeric($item)) { $item = ($item) ? 'true' : 'false'; } } diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index e7484cb62..00e733d40 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -748,7 +748,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } if ($field['type'] === 'boolean') { - $fields['default'] = $this->conn->convertBooleans($field['default']); + $field['default'] = $this->conn->convertBooleans($field['default']); } $default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']); }