From 1364b6acc6a3833b3d65df69f558e6937300c9e7 Mon Sep 17 00:00:00 2001
From: Alex Pogodin <alex_pogodin@yahoo.com>
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];
         }