Commit 05acd91d authored by adrive's avatar adrive

Merge r3769 (fixed problem with convertBoolean in Pgsql)

parent fc4f7e6c
...@@ -106,12 +106,12 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common ...@@ -106,12 +106,12 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common
{ {
if (is_array($item)) { if (is_array($item)) {
foreach ($item as $key => $value) { foreach ($item as $key => $value) {
if (is_bool($value)) { if (is_bool($value) || is_numeric($item)) {
$item[$key] = ($value) ? 'true' : 'false'; $item[$key] = ($value) ? 'true' : 'false';
} }
} }
} else { } else {
if (is_bool($item)) { if (is_bool($item) || is_numeric($item)) {
$item = ($item) ? 'true' : 'false'; $item = ($item) ? 'true' : 'false';
} }
} }
......
...@@ -748,7 +748,7 @@ class Doctrine_Export extends Doctrine_Connection_Module ...@@ -748,7 +748,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
} }
if ($field['type'] === 'boolean') { 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']); $default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment