Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1978

SQLParserUtils array_fill tries to create array with zero elements when empty parameter is bound

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3
    • Fix Version/s: 2.4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:

      Description

      When binding an empty array as a parameter (and specifying a parameter type to work around DDC-1977) SQLParserUtils::expandListParameters tries to use array_fill to generate an empty array.

      https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/SQLParserUtils.php#L127

      Pseudo-code that generated the bug:

      $this->getEntityManager()->createNativeQuery($query, $rsm)->setParameter(1, array())->getArrayResult();
      

        Activity

          People

          • Assignee:
            Fabio B. Silva
            Reporter:
            Matt Button
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: