From b86df0c7129f1819be4a58126988fd23e573cae8 Mon Sep 17 00:00:00 2001 From: tkas Date: Mon, 4 Sep 2023 08:59:17 +0200 Subject: [PATCH 1/2] small updates for PHP8.x compatibility --- includes/config.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/config.class.php b/includes/config.class.php index 4adc8f6..bf6de37 100644 --- a/includes/config.class.php +++ b/includes/config.class.php @@ -62,7 +62,7 @@ private function checkOffset($offset) } } - public function offsetExists($offset) + public function offsetExists($offset): bool { if (isset($this->vars[$offset])) { @@ -120,7 +120,7 @@ protected function loadOffset($offset) return $this->offsetGet($offset); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { if (!isset($this->vars[$offset])) { @@ -141,7 +141,7 @@ public function offsetGet($offset) } } - public function getIterator() + public function getIterator(): Traversable { if (is_dir($this->dir)) { @@ -166,12 +166,12 @@ public function getIterator() return new ArrayIterator($iteratorVars); } - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { throw new Exception('Config may not be changed'); } - public function offsetUnset($offset) + public function offsetUnset($offset): void { throw new Exception('Config may not be changed'); } From 17ce37949207891a2bd8d114c5c45a133e8f4443 Mon Sep 17 00:00:00 2001 From: tkas Date: Tue, 5 Sep 2023 19:43:16 +0200 Subject: [PATCH 2/2] small updates for PHP8.x compatibility - PostgreSQL --- sources/postgresql.php | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/postgresql.php b/sources/postgresql.php index fed60ae..231457f 100644 --- a/sources/postgresql.php +++ b/sources/postgresql.php @@ -46,6 +46,7 @@ class postgresql extends source implements source_rrd private $user; private $password; private $dbname; + private $db; private $backendworking; private $backendwaiting;