From 926394e0d21ce04a9ec0c98316bcc47c834af430 Mon Sep 17 00:00:00 2001 From: arhimede Date: Wed, 29 Mar 2023 13:32:45 +0300 Subject: [PATCH 1/2] Fix invalid call to SerializableLimitIterator's constructor Signed-off-by: arhimede --- src/SerializableLimitIterator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SerializableLimitIterator.php b/src/SerializableLimitIterator.php index a689f9d..0ffce55 100644 --- a/src/SerializableLimitIterator.php +++ b/src/SerializableLimitIterator.php @@ -79,8 +79,9 @@ public function unserialize($data) public function __unserialize(array $data) { - $this->__construct($data['it'], $data['offset'], $data['count']); - $this->seek($data['pos'] + $data['offset']); + $this->offset = (int) $data['offset']; + $this->count = (int) $data['count']; + parent::__construct($data['it'], $this->offset, $this->count); } /** From ad36515320d27fbcb7894ff3957f435555a0b427 Mon Sep 17 00:00:00 2001 From: arhimede Date: Wed, 29 Mar 2023 20:35:49 +0300 Subject: [PATCH 2/2] Fix invalid call to SerializableLimitIterator's constructor Signed-off-by: arhimede --- src/SerializableLimitIterator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SerializableLimitIterator.php b/src/SerializableLimitIterator.php index 0ffce55..189f96c 100644 --- a/src/SerializableLimitIterator.php +++ b/src/SerializableLimitIterator.php @@ -82,6 +82,7 @@ public function __unserialize(array $data) $this->offset = (int) $data['offset']; $this->count = (int) $data['count']; parent::__construct($data['it'], $this->offset, $this->count); + $this->seek($data['pos'] + $data['offset']); } /**