1
0
mirror of synced 2024-12-14 15:16:04 +03:00

Merge pull request #481 from beejeebus/master

check for false as a return value from get_parent_class(), not null
This commit is contained in:
Guilherme Blanco 2012-10-21 20:54:22 -07:00
commit 9d0b254407

View File

@ -34,7 +34,7 @@ class MappingException extends \Doctrine\ORM\ORMException
public static function identifierRequired($entityName) public static function identifierRequired($entityName)
{ {
if (null !== ($parent = get_parent_class($entityName))) { if (false !== ($parent = get_parent_class($entityName))) {
return new self(sprintf( return new self(sprintf(
'No identifier/primary key specified for Entity "%s" sub class of "%s". Every Entity must have an identifier/primary key.', 'No identifier/primary key specified for Entity "%s" sub class of "%s". Every Entity must have an identifier/primary key.',
$entityName, $parent $entityName, $parent
@ -206,7 +206,7 @@ class MappingException extends \Doctrine\ORM\ORMException
public static function classIsNotAValidEntityOrMappedSuperClass($className) public static function classIsNotAValidEntityOrMappedSuperClass($className)
{ {
if (null !== ($parent = get_parent_class($className))) { if (false !== ($parent = get_parent_class($className))) {
return new self(sprintf( return new self(sprintf(
'Class "%s" sub class of "%s" is not a valid entity or mapped super class.', 'Class "%s" sub class of "%s" is not a valid entity or mapped super class.',
$className, $parent $className, $parent