Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2178

Last hydrated element is passed by reference

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Can't Fix
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Test script:

      $em = $this->getDoctrine()->getEntityManager();
      $rows = $em->getRepository('FMECoreBundle:TheListGridRow')
      ->createQueryBuilder('row')
      ->getQuery()
      ->getArrayResult();
      var_dump($rows);

      Output:

      array(3) {
      [0]=>
      array(2)

      { ["id"]=> int(5) ["rank"]=> int(1) }

      [1]=>
      array(2)

      { ["id"]=> int(6) ["rank"]=> int(2) }

      [2]=>
      &array(2)

      { ["id"]=> int(7) ["rank"]=> int(3) }

      }

      As you can see the last element &array(2) is passed by reference and it broke my code. Can you check this please.

        Activity

        Menshinskiy Mikhail created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Can't Fix [ 7 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Menshinskiy Mikhail
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: