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

Updated some comparisons to strict equality

This commit is contained in:
Daniel Holmes 2012-01-16 08:12:11 +11:00
parent 5deebc8738
commit a12e5ac8a7

View File

@ -255,8 +255,8 @@ class ManyToManyPersister extends AbstractCollectionPersister
// shortcut for new entities // shortcut for new entities
$entityState = $uow->getEntityState($element, UnitOfWork::STATE_NEW); $entityState = $uow->getEntityState($element, UnitOfWork::STATE_NEW);
if ($entityState == UnitOfWork::STATE_NEW || if ($entityState === UnitOfWork::STATE_NEW ||
($entityState == UnitOfWork::STATE_MANAGED && $uow->isScheduledForInsert($element))) { ($entityState === UnitOfWork::STATE_MANAGED && $uow->isScheduledForInsert($element))) {
return false; return false;
} }
@ -277,7 +277,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
$uow = $this->_em->getUnitOfWork(); $uow = $this->_em->getUnitOfWork();
// shortcut for new entities // shortcut for new entities
if ($uow->getEntityState($element, UnitOfWork::STATE_NEW) == UnitOfWork::STATE_NEW) { if ($uow->getEntityState($element, UnitOfWork::STATE_NEW) === UnitOfWork::STATE_NEW) {
return false; return false;
} }