Commit 9e35c902 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 10f96e01
...@@ -219,14 +219,18 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun ...@@ -219,14 +219,18 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
* @param array $item * @param array $item
* @return void * @return void
*/ */
public function convertBooleans(array $items) public function convertBooleans($item)
{ {
foreach ($items as $k => $item) { if (is_array($item)) {
if (is_bool($item)) { foreach ($item as $k => $value) {
$items[$k] = (int) $item; if (is_bool($item)) {
$item[$k] = (int) $value;
}
} }
} else {
$item = (int) $item;
} }
return $items; return $item;
} }
/** /**
* Quote a string so it can be safely used as a table or column name * Quote a string so it can be safely used as a table or column name
......
...@@ -99,9 +99,16 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common ...@@ -99,9 +99,16 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common
* @param array $item * @param array $item
* @return void * @return void
*/ */
public function convertBooleans(array $items) public function convertBooleans($item)
{ {
return $items; if (is_array($item)) {
foreach ($item as $key => $value) {
$item[$key] = ($value) ? 'true' : 'false';
}
} else {
$item = ($item) ? 'true' : 'false';
}
return $item;
} }
/** /**
* Changes a query string for various DBMS specific reasons * Changes a query string for various DBMS specific reasons
......
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