Skip to content

Commit

Permalink
Merge pull request #27 from phofmann-trust/master
Browse files Browse the repository at this point in the history
Don't use param $fields as $query when $query is empty.
  • Loading branch information
bcrowe committed Sep 22, 2015
2 parents 1ac90e2 + 8e54686 commit ded817d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/League/Monga/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ public function find($query = [], $fields = [], $findOne = false)

// Prepare the find arguments
$arguments = [];
empty($query) || $arguments[] = $query;
empty($fields) || $arguments[] = $fields;
$arguments[] = $query;
$arguments[] = $fields;

// Wrap the find function so it is callable
$function = [
Expand Down

0 comments on commit ded817d

Please sign in to comment.