2
0
forked from Wavyzz/dolibarr

Fix error

This commit is contained in:
Laurent Destailleur
2024-10-02 12:16:46 +02:00
parent d25dfc961d
commit 7f8a0860cf

View File

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