From 3aaa3627475ea444af20a53275777613f02452b0 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 24 Oct 2021 09:32:52 +0200 Subject: [PATCH] Fix some PHP8.1 deprecation warnings --- plugins/libcalendaring/libvcalendar.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php index 0bf58456..0cf5a2b9 100644 --- a/plugins/libcalendaring/libvcalendar.php +++ b/plugins/libcalendaring/libvcalendar.php @@ -1473,16 +1473,19 @@ class libvcalendar implements Iterator /*** Implement PHP 5 Iterator interface to make foreach work ***/ + #[\ReturnTypeWillChange] function current() { return $this->objects[$this->iteratorkey]; } + #[\ReturnTypeWillChange] function key() { return $this->iteratorkey; } + #[\ReturnTypeWillChange] function next() { $this->iteratorkey++; @@ -1495,11 +1498,13 @@ class libvcalendar implements Iterator return $this->valid(); } + #[\ReturnTypeWillChange] function rewind() { $this->iteratorkey = 0; } + #[\ReturnTypeWillChange] function valid() { return !empty($this->objects[$this->iteratorkey]);