From 2406fe0fad8b786e439918da15e65db11de6d3f8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 13 Nov 2021 17:45:25 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given --- infolog/inc/class.infolog_so.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index 45825d1a12..95e0e96861 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -801,7 +801,7 @@ class infolog_so } $sortbycf=''; if (!empty($query['order']) && (preg_match('/^[a-z_0-9, ]+$/i',$query['order']) || stripos($query['order'],'#')!==FALSE ) && - (empty($query['sort']) || preg_match('/^(DESC|ASC)$/i',$query['sort']))) + (empty($query['sort']) || is_string($query['sort']) && preg_match('/^(DESC|ASC)$/i',$query['sort']))) { $order = array(); foreach(explode(',',$query['order']) as $val)