From 5bbc2a9e5881dd9caa903ecbe0b02c16b2899bcb Mon Sep 17 00:00:00 2001 From: romanb Date: Wed, 1 Jul 2009 13:31:11 +0000 Subject: [PATCH] [2.0] Changing Collection#removeElement return type to be consistent with Collection#remove --- lib/Doctrine/Common/Collections/Collection.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Common/Collections/Collection.php b/lib/Doctrine/Common/Collections/Collection.php index b9c4d0eb8..4ee8dc25b 100644 --- a/lib/Doctrine/Common/Collections/Collection.php +++ b/lib/Doctrine/Common/Collections/Collection.php @@ -120,10 +120,11 @@ class Collection implements Countable, IteratorAggregate, ArrayAccess { $key = array_search($element, $this->_elements, true); if ($key !== false) { + $removed = $this->_elements[$key]; unset($this->_elements[$key]); - return true; + return $removed; } - return false; + return null; } /**