diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 73d9757de..f53ec67a7 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -2456,6 +2456,6 @@ class UnitOfWork implements PropertyChangedListener if ( ! is_object($object) ) { throw new InvalidArgumentException("Managed entity required"); } - return $this->readOnlyObjects[spl_object_hash($object)]; + return isset($this->readOnlyObjects[spl_object_hash($object)]); } }