Skip to content

Commit bf3b432

Browse files
committed
Fixes #20
/var/www/html/src/Filters/QueryMatchFilter.php:67 Undefined array key 0
1 parent d8ed226 commit bf3b432

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Filters/QueryMatchFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function filter($collection): array
6464
if (AccessHelper::keyExists($value, $key, $this->magicIsAllowed)) {
6565
$value1 = AccessHelper::getValue($value, $key, $this->magicIsAllowed);
6666
} elseif (str_contains($key, '.')) {
67-
$value1 = (new JSONPath($value))->find($key)->getData()[0];
67+
$value1 = (new JSONPath($value))->find($key)->getData()[0] ?? '';
6868
}
6969
if ($value1) {
7070
if ($operator === null && $value1) {

0 commit comments

Comments
 (0)