Skip to content

Commit

Permalink
Merge branch 'DDC-1668' into 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 3, 2012
2 parents 5d3a626 + 884ef42 commit 715fdd7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)

$classAnnotations = $this->_reader->getClassAnnotations($class);

// Compatibility with Doctrine Common 3.x
if ($classAnnotations && is_int(key($classAnnotations))) {
if ($classAnnotations && is_numeric(key($classAnnotations))) {
foreach ($classAnnotations as $annot) {
$classAnnotations[get_class($annot)] = $annot;
}
Expand Down Expand Up @@ -433,8 +432,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
if ($method->isPublic() && $method->getDeclaringClass()->getName() == $class->name) {
$annotations = $this->_reader->getMethodAnnotations($method);

// Compatibility with Doctrine Common 3.x
if ($annotations && is_int(key($annotations))) {
if ($annotations && is_numeric(key($annotations))) {
foreach ($annotations as $annot) {
$annotations[get_class($annot)] = $annot;
}
Expand Down Expand Up @@ -489,8 +487,7 @@ public function isTransient($className)
{
$classAnnotations = $this->_reader->getClassAnnotations(new \ReflectionClass($className));

// Compatibility with Doctrine Common 3.x
if ($classAnnotations && is_int(key($classAnnotations))) {
if ($classAnnotations && is_numeric(key($classAnnotations))) {
foreach ($classAnnotations as $annot) {
if ($annot instanceof \Doctrine\ORM\Mapping\Entity) {
return false;
Expand Down

0 comments on commit 715fdd7

Please sign in to comment.