From 5aa14ab373f0f91279cf8165c4ee83b267f8eef4 Mon Sep 17 00:00:00 2001 From: romanb Date: Wed, 31 Mar 2010 13:15:23 +0000 Subject: [PATCH] [2.0][DDC-485] Fixed regression caused by strict type-hint. Changed to duck-typing. --- lib/Doctrine/DBAL/Connection.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index 8770543d2..a2957c35a 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -23,7 +23,6 @@ namespace Doctrine\DBAL; use PDO, Closure, Doctrine\DBAL\Types\Type, - Doctrine\DBAL\Driver\Statement as DriverStatement, Doctrine\DBAL\Driver\Connection as DriverConnection, Doctrine\Common\EventManager, Doctrine\DBAL\DBALException; @@ -862,11 +861,13 @@ class Connection implements DriverConnection * Binds a set of parameters, some or all of which are typed with a PDO binding type * or DBAL mapping type, to a given statement. * - * @param DriverStatement $stmt The statement to bind the values to. + * @param $stmt The statement to bind the values to. * @param array $params The map/list of named/positional parameters. * @param array $types The parameter types (PDO binding types or DBAL mapping types). + * @internal Duck-typing used on the $stmt parameter to support driver statements as well as + * raw PDOStatement instances. */ - private function _bindTypedValues(DriverStatement $stmt, array $params, array $types) + private function _bindTypedValues($stmt, array $params, array $types) { // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO. if (is_int(key($params))) {