From 49cacec3c62e94b61b6a134f185311c479627d81 Mon Sep 17 00:00:00 2001 From: Steve Taylor Date: Thu, 27 Apr 2023 08:29:26 -0700 Subject: [PATCH 1/2] Suppress deprecation warnings for PHP 8 --- .../field_object/includes/FieldChain.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/field_object/includes/FieldChain.inc b/field_object/includes/FieldChain.inc index 7cf0f50e..f18ab4d6 100644 --- a/field_object/includes/FieldChain.inc +++ b/field_object/includes/FieldChain.inc @@ -78,6 +78,7 @@ class FieldChain implements SeekableIterator { /** * Implements SeekableIterator::seek(). */ + #[\ReturnTypeWillChange] public function seek($position) { if ($position >= 0 && $position < sizeof($this->chain)) { $this->index = $position; @@ -90,6 +91,7 @@ class FieldChain implements SeekableIterator { /** * Implements Iterator::current(). */ + #[\ReturnTypeWillChange] public function current() { return $this->chain[$this->index]; } @@ -97,6 +99,7 @@ class FieldChain implements SeekableIterator { /** * Implements Iterator::key(). */ + #[\ReturnTypeWillChange] public function key() { return $this->current()->__toString(); } @@ -104,6 +107,7 @@ class FieldChain implements SeekableIterator { /** * Implements Iterator::next(). */ + #[\ReturnTypeWillChange] public function next() { $this->index++; } @@ -111,6 +115,7 @@ class FieldChain implements SeekableIterator { /** * Implements Iterator::rewind(). */ + #[\ReturnTypeWillChange] public function rewind() { $this->index = 0; } @@ -118,6 +123,7 @@ class FieldChain implements SeekableIterator { /** * Implements Iterator::valid(). */ + #[\ReturnTypeWillChange] public function valid() { return ($this->index < sizeof($this->chain)); } -- 2.34.1