Skip to content

Commit

Permalink
Merge pull request #19 from alessandrofrancesconi/array_values
Browse files Browse the repository at this point in the history
Workaround for issue #17
  • Loading branch information
jamesmoss committed Jan 10, 2015
2 parents 1733e4e + 349b7b2 commit 69d01c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JamesMoss/Flywheel/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function execute()

if ($this->where) {
list($field, $operator, $predicate) = $this->where;
$documents = array_filter($documents, function ($doc) use ($field, $operator, $predicate) {
$documents = array_values(array_filter($documents, function ($doc) use ($field, $operator, $predicate) {
if (false === strpos($field, '.')) {
$value = $doc->{$field};
} else {
Expand Down Expand Up @@ -121,7 +121,7 @@ public function execute()
}

return false;
});
}));
}

if ($this->orderBy) {
Expand Down

0 comments on commit 69d01c7

Please sign in to comment.