Skip to content

Commit 01b94a8

Browse files
committed
Handle filter expression on current object
1 parent de9a971 commit 01b94a8

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Filters/QueryMatchFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function filter($collection): array
105105
$comparisonResult = null;
106106
if ($notNothing) {
107107
$comparisonResult = match ($operator) {
108-
null => AccessHelper::keyExists($value, $key, $this->magicIsAllowed),
108+
null => AccessHelper::keyExists($value, $key, $this->magicIsAllowed) || (!$key),
109109
"=", "==" => $this->compareEquals($value1, $comparisonValue),
110110
"!=", "!==", "<>" => !$this->compareEquals($value1, $comparisonValue),
111111
'=~' => @\preg_match($comparisonValue, $value1),

tests/data/baselineFailedQueries.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
bracket_notation_with_quoted_closing_bracket_literal
22
dot_notation_with_key_root_literal
3-
filter_expression_with_current_object
43
filter_expression_with_different_grouped_operators
54
filter_expression_with_tautological_comparison
65
union_with_wildcard_and_number

0 commit comments

Comments
 (0)