From a75d73b889e2cbeb6900168917a284fbf73603f5 Mon Sep 17 00:00:00 2001 From: Alex Pogodin Date: Sun, 22 Sep 2013 17:19:51 +0300 Subject: [PATCH] Identifier can be empty for MappedSuperclasses When MappedSuperclass is inspected without identifier column been assigned, always return false. Solves "Undefined offset" notice. --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 9b3b29492..4e89cf883 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -1031,6 +1031,9 @@ class ClassMetadataInfo implements ClassMetadata */ public function isIdentifier($fieldName) { + if (0 == count($this->identifier)) { + return false; + } if ( ! $this->isIdentifierComposite) { return $fieldName === $this->identifier[0]; }