1
0
mirror of synced 2025-01-18 14:31:40 +03:00

Merge r3769 (fixed problem with convertBoolean in Pgsql)

This commit is contained in:
adrive 2008-02-14 13:27:48 +00:00
parent fc4f7e6c1a
commit 05acd91da8
2 changed files with 3 additions and 3 deletions

View File

@ -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';
}
}

View File

@ -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']);
}