Skip to content

Commit

Permalink
Fix array key access in lib/Doctrine/Import/Builder.php
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Quercia <[email protected]>
  • Loading branch information
2 people authored and thePanz committed Nov 17, 2023
1 parent 8d045bd commit 0978095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Import/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ public function buildPhpDocs(array $definition)
if (isset($definition['relations']) && ! empty($definition['relations'])) {
foreach ($definition['relations'] as $relation) {
$type = (isset($relation['type']) && $relation['type'] == Doctrine_Relation::MANY) ? 'Doctrine_Collection' : $this->_classPrefix . $relation['class'];
if ($relation["type"] == Doctrine_Relation::ONE) {
if ((isset($relation['type']) ? $relation['type'] : null) == Doctrine_Relation::ONE) {
$properties[] = array($relation['class'], $relation['alias'], "");
$getters[] = array($relation['class'], $relation['alias'], "");
$setters[] = array($definition['topLevelClassName'], $relation['alias'], $relation['class'], "");
Expand Down

0 comments on commit 0978095

Please sign in to comment.