support empty values with prefixes

This commit is contained in:
2023-05-11 09:14:37 +10:00
parent 8a6d1281bb
commit d0ea0ae4d3

View File

@@ -160,9 +160,9 @@ class Conductor
$prefix = '';
// Check if value has a prefix and remove it if it's a number
if (preg_match('/^(!?=|[<>]=?|<>|!)([^=!<>].*)$/', $value, $matches) > 0) {
if (preg_match('/^(!?=|[<>]=?|<>|!)([^=!<>].*)*$/', $value, $matches) > 0) {
$prefix = $matches[1];
$value = $matches[2];
$value = ($matches[2] ?? '');
}
// Apply the prefix to the query if the value is a number