From d0ea0ae4d322891c7dc1014cff622979ef6a523d Mon Sep 17 00:00:00 2001 From: James Collins Date: Thu, 11 May 2023 09:14:37 +1000 Subject: [PATCH] support empty values with prefixes --- app/Conductors/Conductor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Conductors/Conductor.php b/app/Conductors/Conductor.php index 831b3b4..593172b 100644 --- a/app/Conductors/Conductor.php +++ b/app/Conductors/Conductor.php @@ -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