Skip to content

Commit 1a13849

Browse files
committed
PHP 7.2 compat for absence of quoted terms #7877
1 parent c3f3ddf commit 1a13849

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Api/Input/Operator/SearchOperatorType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ private function parseWords(string $term): array
161161
$words = preg_split('/[[:space:]]+/', $termWithoutExact, -1, PREG_SPLIT_NO_EMPTY) ?: [];
162162

163163
// Combine both list
164-
array_push($words, ...$exactTerms);
164+
if ($exactTerms) {
165+
array_push($words, ...$exactTerms);
166+
}
165167

166168
// Drop duplicates
167169
$words = array_unique($words);

0 commit comments

Comments
 (0)