[BUGFIX] Fix access to empty ObjectStorage with numeric key
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / ObjectStorage.php
index 830d821..5de3cc2 100644 (file)
@@ -157,7 +157,7 @@ class ObjectStorage implements \Countable, \Iterator, \ArrayAccess, ObjectMonito
         * @return boolean
         */
        public function offsetExists($object) {
-               return isset($this->storage[spl_object_hash($object)]);
+               return is_object($object) && isset($this->storage[spl_object_hash($object)]);
        }
 
        /**