From d2ee571009b5a168a7c195f6da7f85a1cf1cefe6 Mon Sep 17 00:00:00 2001 From: basico Date: Mon, 17 Dec 2012 23:01:56 +0000 Subject: [PATCH] Update lib/Doctrine/Common/Collections/ArrayCollection.php --- lib/Doctrine/Common/Collections/ArrayCollection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Common/Collections/ArrayCollection.php b/lib/Doctrine/Common/Collections/ArrayCollection.php index f4e6ce4f3..52ceef0a9 100644 --- a/lib/Doctrine/Common/Collections/ArrayCollection.php +++ b/lib/Doctrine/Common/Collections/ArrayCollection.php @@ -120,7 +120,7 @@ public function current() */ public function remove($key) { - if (array_key_exists($key, $this->_elements)) { + if (isset($this->_elements[$key]) || array_key_exists($key, $this->_elements)) { $removed = $this->_elements[$key]; unset($this->_elements[$key]); @@ -214,7 +214,7 @@ public function offsetUnset($offset) */ public function containsKey($key) { - return array_key_exists($key, $this->_elements); + return isset($this->_elements[$key]) || array_key_exists($key, $this->_elements); } /**