diff --git a/lib/Doctrine/ORM/Query/ParameterTypeInferer.php b/lib/Doctrine/ORM/Query/ParameterTypeInferer.php index 45a0aab089..0c4df55ee9 100644 --- a/lib/Doctrine/ORM/Query/ParameterTypeInferer.php +++ b/lib/Doctrine/ORM/Query/ParameterTypeInferer.php @@ -25,7 +25,7 @@ /** * Provides an enclosed support for parameter infering. * - * + * * @link www.doctrine-project.org * @since 2.0 * @author Benjamin Eberlei @@ -50,6 +50,10 @@ public static function inferType($value) return Type::INTEGER; } + if (is_bool($value)) { + return Type::BOOLEAN; + } + if ($value instanceof \DateTime) { return Type::DATETIME; } @@ -62,4 +66,4 @@ public static function inferType($value) return \PDO::PARAM_STR; } -} \ No newline at end of file +}