Skip to content

Commit

Permalink
Don't use param $fields as $query when $query is empty.
Browse files Browse the repository at this point in the history
Fixes #23
  • Loading branch information
phofmann-trust committed Sep 22, 2015
1 parent 1ac90e2 commit 8e54686
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/League/Monga/Collection.php
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 8e54686

Please sign in to comment.