Skip to content

Commit 37dd227

Browse files
authored
[5.x] Fix filterWhere with arrays (#13507)
1 parent 15118e7 commit 37dd227

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Stache/Query/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ protected function filterWhereIn($values, $where)
160160
$lookup = array_flip(array_map(fn ($v) => $v ?? '__NULL__', $where['values']));
161161

162162
return $values->filter(
163-
fn ($value) => isset($lookup[$value ?? '__NULL__'])
163+
fn ($value) => ! is_array($value) && isset($lookup[$value ?? '__NULL__'])
164164
);
165165
}
166166

@@ -169,7 +169,7 @@ protected function filterWhereNotIn($values, $where)
169169
$lookup = array_flip(array_map(fn ($v) => $v ?? '__NULL__', $where['values']));
170170

171171
return $values->filter(
172-
fn ($value) => ! isset($lookup[$value ?? '__NULL__'])
172+
fn ($value) => is_array($value) || ! isset($lookup[$value ?? '__NULL__'])
173173
);
174174
}
175175

0 commit comments

Comments
 (0)