This commit is contained in:
parent
10f96e01e3
commit
9e35c9029b
@ -219,14 +219,18 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
|
||||
* @param array $item
|
||||
* @return void
|
||||
*/
|
||||
public function convertBooleans(array $items)
|
||||
public function convertBooleans($item)
|
||||
{
|
||||
foreach ($items as $k => $item) {
|
||||
if (is_bool($item)) {
|
||||
$items[$k] = (int) $item;
|
||||
if (is_array($item)) {
|
||||
foreach ($item as $k => $value) {
|
||||
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
|
||||
|
@ -99,9 +99,16 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common
|
||||
* @param array $item
|
||||
* @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
|
||||
|
Loading…
x
Reference in New Issue
Block a user