mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-24 18:13:00 +01:00
Merge pull request #415 from hakre/patch-1
FilterIterator expects Iterator not Traversable
This commit is contained in:
commit
0be702d382
@ -15,12 +15,12 @@ class FilterIterator extends \FilterIterator
|
||||
protected $callback;
|
||||
|
||||
/**
|
||||
* @param \Traversable $iterator Traversable iterator
|
||||
* @param \Iterator $iterator Traversable iterator
|
||||
* @param array|\Closure $callback Callback used for filtering. Return true to keep or false to filter.
|
||||
*
|
||||
* @throws InvalidArgumentException if the callback if not callable
|
||||
*/
|
||||
public function __construct(\Traversable $iterator, $callback)
|
||||
public function __construct(\Iterator $iterator, $callback)
|
||||
{
|
||||
parent::__construct($iterator);
|
||||
if (!is_callable($callback)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user