Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1192

fix undefined variable in join-column section of xml driver

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.0.6, 2.1
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      $name is undefined, It might be that the fix is as simple as foreach ($manyToOneElement->

      {'join-columns'}->{'join-column'} as $name => $joinColumnElement) {
      but I'm not sure
      
      

      if (isset($manyToOneElement->{'join-column'})) {
      $joinColumns[] = $this->_getJoinColumnMapping($manyToOneElement->{'join-column'});
      } else if (isset($manyToOneElement->{'join-columns'}

      )) {
      foreach ($manyToOneElement->

      {'join-columns'}

      ->

      {'join-column'}

      as $joinColumnElement) {
      if (!isset($joinColumnElement['name']))

      { $joinColumnElement['name'] = $name; }

      $joinColumns[] = $this->_getJoinColumnMapping($joinColumnElement);
      }
      }

      
      

        Activity

        Hide
        Benjamin Eberlei added a comment -

        This is a copy paste error from the YAML Driver, i fixed it.

        Show
        Benjamin Eberlei added a comment - This is a copy paste error from the YAML Driver, i fixed it.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Miha Vrhovnik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: