From e6f9559fbbb56e26e22172c44226f98e82370029 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Mon, 29 Jul 2024 16:30:48 +0900 Subject: [PATCH] DB IO: placeholder fix for JSON/JSONB lists --- www/lib/CoreLibs/DB/IO.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/lib/CoreLibs/DB/IO.php b/www/lib/CoreLibs/DB/IO.php index efe3901c..a6d7ad63 100644 --- a/www/lib/CoreLibs/DB/IO.php +++ b/www/lib/CoreLibs/DB/IO.php @@ -1324,8 +1324,12 @@ class IO // /s for matching new line in . list // [disabled, we don't used ^ or $] /m for multi line match // Matches in 1:, must be array_filtered to remove empty, count with array_unique + $query_split = '[(=,?-]|->|->>|#>|#>>|@>|<@|\?\|\?\&|\|\||#-'; preg_match_all( - '/(?:\'.*?\')?\s*(?:\?\?|<>|[(=,])\s*(?:\d+|(?:\'.*?\')|(\$[1-9]{1}(?:[0-9]{1,})?))/s', + '/' + . '(?:\'.*?\')?\s*(?:\?\?|<>|' . $query_split . ')\s*' + . '(?:\d+|(?:\'.*?\')|(\$[1-9]{1}(?:[0-9]{1,})?))' + . '/s', $query, $match );