fix PHP 8.0 TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given

This commit is contained in:
Ralf Becker 2021-10-08 11:39:32 +02:00
parent 7d95139fa9
commit 0812bfaa79

View File

@ -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))
{