From 7f8a0860cf2e19e014e7ffcc5d3b9c98ce0772f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 12:16:46 +0200 Subject: [PATCH] Fix error --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0ac5ea25bb0..31297c84a9a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13497,7 +13497,7 @@ function jsonOrUnserialize($stringtodecode) /** * forgeSQLFromUniversalSearchCriteria * - * @param string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with + * @param ?string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with * aaa is a field name (with alias or not) and * bbb is one of this operator '=', '<', '>', '<=', '>=', '!=', 'in', 'notin', 'like', 'notlike', 'is', 'isnot'. * ccc must not contains ( or ) @@ -13514,7 +13514,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = { global $db, $user; - if ($filter === '') { + if (is_null($filter) || $filter === '') { return ''; } if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with ()