mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12575] Workaround for offsetExists seems not required for the Iterator.
PHPBB3-12575
This commit is contained in:
parent
87a13a8c77
commit
f460287856
1 changed files with 1 additions and 16 deletions
|
@ -36,21 +36,6 @@ class service_collection_iterator extends \ArrayIterator
|
||||||
$this->collection = $collection;
|
$this->collection = $collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Because of a PHP issue we have to redefine offsetExists
|
|
||||||
// (even with a call to the parent):
|
|
||||||
// https://bugs.php.net/bug.php?id=66834
|
|
||||||
// https://bugs.php.net/bug.php?id=67067
|
|
||||||
// But it triggers a sniffer issue that we have to skip
|
|
||||||
// @codingStandardsIgnoreStart
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function offsetExists($index)
|
|
||||||
{
|
|
||||||
parent::offsetExists($index);
|
|
||||||
}
|
|
||||||
// @codingStandardsIgnoreEnd
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -60,7 +45,7 @@ class service_collection_iterator extends \ArrayIterator
|
||||||
if ($task === null)
|
if ($task === null)
|
||||||
{
|
{
|
||||||
$name = $this->key();
|
$name = $this->key();
|
||||||
$task = $this->collection[$name];
|
$task = $this->collection->offsetGet($name);
|
||||||
$this->offsetSet($name, $task);
|
$this->offsetSet($name, $task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue