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

        Miha Vrhovnik created issue -
        Miha Vrhovnik made changes -
        Field Original Value New Value
        Fix Version/s 2.1 [ 10022 ]
        Benjamin Eberlei made changes -
        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);
                            }
                        }
        $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

        {code}
                        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);
                            }
                        }
        {code}
        Benjamin Eberlei made changes -
        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

        {code}
                        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);
                            }
                        }
        {code}
        $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

        {code}
        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);
            }
        }
        {code}
        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.
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.6 [ 10140 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 12693 ] jira-feedback [ 14892 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14892 ] jira-feedback2 [ 16756 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16756 ] jira-feedback3 [ 19009 ]

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

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: