From 0812bfaa7920dff64693bc3735ec02205755e562 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 8 Oct 2021 11:39:32 +0200 Subject: [PATCH] fix PHP 8.0 TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given --- infolog/inc/class.infolog_bo.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 25b2a597de..5b74a943b2 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -615,7 +615,7 @@ class infolog_bo function &read($info_id,$run_link_id2from=true,$date_format='ts',$ignore_acl=false) { //error_log(__METHOD__.'('.array2string($info_id).', '.array2string($run_link_id2from).", '$date_format') ".function_backtrace()); - if (is_scalar($info_id) || isset($info_id[count($info_id)-1])) + if (is_scalar($info_id) || is_array($info_id) && isset($info_id[count($info_id)-1])) { if (is_scalar($info_id) && !is_numeric($info_id)) {