From ca82a4720b53f704e6d5955aff846c2904b5a645 Mon Sep 17 00:00:00 2001 From: "justin.randell" Date: Tue, 16 Oct 2012 15:04:25 +1100 Subject: [PATCH] check for false as a return value from get_parent_class(), not null --- lib/Doctrine/ORM/Mapping/MappingException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index fd4e1a8ec..9b97a1f0b 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -34,7 +34,7 @@ class MappingException extends \Doctrine\ORM\ORMException public static function identifierRequired($entityName) { - if (null !== ($parent = get_parent_class($entityName))) { + if (false !== ($parent = get_parent_class($entityName))) { return new self(sprintf( 'No identifier/primary key specified for Entity "%s" sub class of "%s". Every Entity must have an identifier/primary key.', $entityName, $parent @@ -206,7 +206,7 @@ class MappingException extends \Doctrine\ORM\ORMException public static function classIsNotAValidEntityOrMappedSuperClass($className) { - if (null !== ($parent = get_parent_class($className))) { + if (false !== ($parent = get_parent_class($className))) { return new self(sprintf( 'Class "%s" sub class of "%s" is not a valid entity or mapped super class.', $className, $parent