Skip to content

Commit

Permalink
rewind before exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 17, 2022
1 parent 8e96c32 commit 34ed294
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Persistence/Array_/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public function count()
*/
public function exists()
{
$this->generator->rewind();
$this->generator = new \ArrayIterator([[$this->generator->valid() ? 1 : 0]]);

return $this;
Expand Down

0 comments on commit 34ed294

Please sign in to comment.