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'], "");