Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-485

Doctrine\DBAL\Connection::_bindTypedValues() must implement interface Doctrine\DBAL\Driver\Statement

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA1
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      I haven't fully investigated this, but doing an update on trunk today I started receiving the following error message:

      Catchable fatal error: Argument 1 passed to Doctrine\DBAL\Connection::_bindTypedValues() must implement interface Doctrine\DBAL\Driver\Statement, instance of PDOStatement given, called in ./library/Doctrine/DBAL/Connection.php on line 639 and defined in ./library/Doctrine/DBAL/Connection.php on line 869

      This is occurring when a row is updated to point to the related field in another row (when both are persisted at the same time). It doesn't actually break the updates (with xdebug installed anyway).

      It only appears to occur with a select few of my models that contain cascaded persists (and I'll be sure to attempt a test case for this for tomorrow). I haven't tested this fully but wanted to post this in case anyone has an idea of why this might be happening.

        Activity

        Hide
        Roman S. Borschel added a comment -

        Hm, are you creating the PDO instance yourself (and passing it to Doctrine via the 'pdo' option)? That might be the reason.

        Show
        Roman S. Borschel added a comment - Hm, are you creating the PDO instance yourself (and passing it to Doctrine via the 'pdo' option)? That might be the reason.
        Hide
        Roman S. Borschel added a comment -

        I'm not sure whether we should just remove the typehint and use duck-typing there or whether we should enforce a better way.

        Show
        Roman S. Borschel added a comment - I'm not sure whether we should just remove the typehint and use duck-typing there or whether we should enforce a better way.
        Hide
        Michael Ridgway added a comment -

        Yes, we are passing a PDO instance to Doctrine.

        Show
        Michael Ridgway added a comment - Yes, we are passing a PDO instance to Doctrine.
        Hide
        Roman S. Borschel added a comment -

        Should be fixed now. The method in question now uses duck-typing.

        Show
        Roman S. Borschel added a comment - Should be fixed now. The method in question now uses duck-typing.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Michael Ridgway
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: