diff --git a/framework/core/src/Search/AbstractRegexGambit.php b/framework/core/src/Search/AbstractRegexGambit.php index fa5fae5e8..3f3294e6c 100644 --- a/framework/core/src/Search/AbstractRegexGambit.php +++ b/framework/core/src/Search/AbstractRegexGambit.php @@ -38,7 +38,7 @@ abstract class AbstractRegexGambit implements GambitInterface */ protected function match($bit) { - if (preg_match('/^(-?)'.$this->getGambitPattern().'$/i', $bit, $matches)) { + if (! empty($bit) && preg_match('/^(-?)'.$this->getGambitPattern().'$/i', $bit, $matches)) { return $matches; }