Commit 5aa14ab3 authored by romanb's avatar romanb

[2.0][DDC-485] Fixed regression caused by strict type-hint. Changed to duck-typing.

parent 1f3c798a
......@@ -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))) {
......
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