mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12575] Do not duplicate logic in service_collection_iterator.
PHPBB3-12575
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user