From ee777373c6663e970ec8d908f8c365a39e3766cd Mon Sep 17 00:00:00 2001 From: Bernhard D <44983792+nichtsooft@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:35:12 +0100 Subject: [PATCH] Update PDO.Iterator.class.php Compatibility issue with PHP v8.2.26 --- src/PDO.Iterator.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PDO.Iterator.class.php b/src/PDO.Iterator.class.php index 6b0a20f..bb1909e 100644 --- a/src/PDO.Iterator.class.php +++ b/src/PDO.Iterator.class.php @@ -11,20 +11,24 @@ public function __construct(PDOStatement $pdo, $fetchMode = PDO::FETCH_ASSOC) { $this->fetchMode = $fetchMode; } + #[\ReturnTypeWillChange] function rewind() { $this->position = 0; $this->pdo->execute(); $this->nextResult = $this->pdo->fetch($this->fetchMode, PDO::FETCH_ORI_NEXT); } + #[\ReturnTypeWillChange] function current() { return $this->nextResult; } + #[\ReturnTypeWillChange] function key() { return $this->position; } + #[\ReturnTypeWillChange] function next() { ++$this->position; $this->nextResult = $this->pdo->fetch($this->fetchMode, PDO::FETCH_ORI_NEXT); @@ -37,4 +41,4 @@ function valid() { } return !$invalid; } -} \ No newline at end of file +}