DDC-1192: fix undefined variable in join-column section of xml driver #1503

Closed
opened 2026-01-22 13:16:18 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 3, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user mvrhov:

$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);
    }
}
Originally created by @doctrinebot on GitHub (Jun 3, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user mvrhov: $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); } } ```
admin added the Bug label 2026-01-22 13:16:18 +01:00
admin closed this issue 2026-01-22 13:16:19 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 5, 2011):

Comment created by @beberlei:

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

@doctrinebot commented on GitHub (Jun 5, 2011): Comment created by @beberlei: This is a copy paste error from the YAML Driver, i fixed it.
Author
Owner

@doctrinebot commented on GitHub (Jun 5, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jun 5, 2011): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1503