fix PHP 8.0 TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given

This commit is contained in:
Ralf Becker 2021-11-13 17:45:25 +01:00
parent be1920b687
commit 2406fe0fad

View File

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