From 0978095bf51d95a8875df705c590a21363cec797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Pf=C3=A4hler?= <10995809+paddyhamburg@users.noreply.github.com> Date: Tue, 27 Jun 2023 14:55:03 +0200 Subject: [PATCH] Fix array key access in lib/Doctrine/Import/Builder.php Co-authored-by: Alexandre Quercia --- lib/Doctrine/Import/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Import/Builder.php b/lib/Doctrine/Import/Builder.php index d27cd4206..7dc64d4ab 100644 --- a/lib/Doctrine/Import/Builder.php +++ b/lib/Doctrine/Import/Builder.php @@ -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'], "");