Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2607

[GH-753] JoinedSubclassPersister doesn't properly bind on some versions of php


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4, 2.3.5
    • Component/s: None
    • Security Level: All
    • Labels:


      This issue is created automatically through a Github pull request on behalf of 51systems:



      I ran into this bug after deploying an application to production:

      An exception occurred while executing 'INSERT INTO TextSprite (id, text, fontId) VALUES (?, ?, ?)' with params ["4"]:

      SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

      The parent table is being inserted properly (It's where the single param 4 comes from for the id), but the child table insert fails.

      This was on a shared host with PHP version 5.3.24. On my development machine, everything works fine.

      The issue is when the id is not a composite key, it's just a string (in this case), and for whatever reason !isset($id[$columnName]) fails to return a sane value on my production version of php.

      By adding a check to see if the ID is an array we can determine if its a composite key, and not bother with the column checks if its not.

      Not sure how to write unit tests for this one since it only affects certain versions of PHP (apparently). So advice on that is appreciated.


        Doctrine Bot created issue -
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-753] was closed:

        Doctrine Bot added a comment - A related Github Pull-Request [GH-753] was closed:
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.4 [ 10321 ]
        Fix Version/s 2.3.5 [ 10521 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to failed: Error in remote call to 'FishEye 0 (' ( [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2607, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            Benjamin Eberlei
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: