Skip to content

Commit

Permalink
Relax assertion to include null as possible outcome (#9355)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Jan 10, 2022
1 parent 656f881 commit e487b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function onNotFoundMetadata($className)

$this->evm->dispatchEvent(Events::onClassMetadataNotFound, $eventArgs);
$classMetadata = $eventArgs->getFoundMetadata();
assert($classMetadata instanceof ClassMetadata);
assert($classMetadata instanceof ClassMetadata || $classMetadata === null);

return $classMetadata;
}
Expand Down

0 comments on commit e487b6f

Please sign in to comment.