From e13596dadb9e412d760fe8c6398cc427a1f14314 Mon Sep 17 00:00:00 2001 From: ikke-zelf <65031378+ikke-zelf@users.noreply.github.com> Date: Fri, 9 Dec 2022 23:57:28 +0100 Subject: [PATCH] Type Countable Array in php 8.1 not valid coded count(): Argument #1 ($var) must be of type Countable|array, null given. Adjustments made to comply with php 8.1 coding. Without this no domains can be registered. --- .../openprovider/OpenProvider/API/CustomerTags.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/registrars/openprovider/OpenProvider/API/CustomerTags.php b/modules/registrars/openprovider/OpenProvider/API/CustomerTags.php index ccc9baba..397400d9 100644 --- a/modules/registrars/openprovider/OpenProvider/API/CustomerTags.php +++ b/modules/registrars/openprovider/OpenProvider/API/CustomerTags.php @@ -29,7 +29,7 @@ public function __construct($tags = array()) */ public function setTags($tags = array()) { - if (!count($tags) || empty($tags)) + if (!count((array)$tags) || empty($tags)) $this->tags = []; $this->tags = array_map(function ($tag) { @@ -37,7 +37,7 @@ public function setTags($tags = array()) 'key' => 'customer', 'value' => $tag, ]; - }, $tags); + }, (array)$tags); } /** @@ -49,4 +49,4 @@ public function getTags() { return $this->tags; } -} \ No newline at end of file +}