diff --git a/lib/Doctrine/Connection.php b/lib/Doctrine/Connection.php index 1252bc6dd..884640da0 100644 --- a/lib/Doctrine/Connection.php +++ b/lib/Doctrine/Connection.php @@ -203,6 +203,25 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $text; } + /** + * convertBoolean + * some drivers need the boolean values to be converted into integers + * when using DQL API + * + * This method takes care of that conversion + * + * @param array $item + * @return void + */ + public function convertBooleans(array $items) + { + foreach ($items as $k => $item) { + if (is_bool($item)) { + $items[$k] = (int) $item; + } + } + return $items; + } /** * Quote a string so it can be safely used as a table or column name * diff --git a/lib/Doctrine/Expression.php b/lib/Doctrine/Expression.php index d0e7c0a7b..5899768c3 100644 --- a/lib/Doctrine/Expression.php +++ b/lib/Doctrine/Expression.php @@ -272,7 +272,7 @@ class Doctrine_Expression extends Doctrine_Connection_Module public function concat($args) { $cols = $this->getIdentifiers($args); - return 'CONCAT(' . join(', ', $cols) . ')'; + return 'CONCAT(' . join(', ', (array) $cols) . ')'; } /** * Returns the SQL for a logical not.