From 2149bd4e8f34092be8ef75cf59b9bd410d9a80d5 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 14 Jun 2014 18:33:23 +0200 Subject: [ticket/12575] Do not duplicate logic in service_collection_iterator. PHPBB3-12575 --- phpBB/phpbb/di/service_collection_iterator.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/phpBB/phpbb/di/service_collection_iterator.php b/phpBB/phpbb/di/service_collection_iterator.php index 3fb5671cc5..0d031ab52d 100644 --- a/phpBB/phpbb/di/service_collection_iterator.php +++ b/phpBB/phpbb/di/service_collection_iterator.php @@ -41,14 +41,6 @@ class service_collection_iterator extends \ArrayIterator */ public function current() { - $task = parent::current(); - if ($task === null) - { - $name = $this->key(); - $task = $this->collection->offsetGet($name); - $this->offsetSet($name, $task); - } - - return $task; + return $this->collection->offsetGet($this->key()); } } -- cgit v1.2.1