Browse files

Merge pull request #481 from beejeebus/master

check for false as a return value from get_parent_class(), not null
  • Loading branch information...
2 parents 38d8c7f + ca82a47 commit 9d0b254407e6f8827e0f00aa4ed0fcefc6111aad @guilhermeblanco guilhermeblanco committed Oct 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Doctrine/ORM/Mapping/MappingException.php
View
4 lib/Doctrine/ORM/Mapping/MappingException.php
@@ -34,7 +34,7 @@ public static function pathRequired()
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 @@ public static function joinColumnMustPointToMappedField($className, $joinColumn)
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

0 comments on commit 9d0b254

Please sign in to comment.