From b784a04cf753a9339482185f6e98f18e93328aed Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 16 Feb 2016 04:46:34 +0000 Subject: [PATCH] Fixed only variables should be passed by reference issue --- lib/Doctrine/ORM/UnitOfWork.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 4b61e7db6..914c81ea2 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -1043,13 +1043,15 @@ class UnitOfWork implements PropertyChangedListener $postUpdateInvoke = $this->listenersInvoker->getSubscribedSystems($class, Events::postUpdate); foreach ($this->entityUpdates as $oid => $entity) { - if ($this->em->getClassMetadata(get_class($entity))->name !== $className) { continue; } if ($preUpdateInvoke != ListenersInvoker::INVOKE_NONE) { - $this->listenersInvoker->invoke($class, Events::preUpdate, $entity, new PreUpdateEventArgs($entity, $this->em, $this->getEntityChangeSet($entity)), $preUpdateInvoke); + $changeset = $this->getEntityChangeSet($entity); + + $this->listenersInvoker->invoke($class, Events::preUpdate, $entity, new PreUpdateEventArgs($entity, $this->em, $changeset), $preUpdateInvoke); + $this->recomputeSingleEntityChangeSet($class, $entity); }