Skip to content

Commit ded817d

Browse files
committed
Merge pull request #27 from phofmann-trust/master
Don't use param $fields as $query when $query is empty.
2 parents 1ac90e2 + 8e54686 commit ded817d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/League/Monga/Collection.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ public function find($query = [], $fields = [], $findOne = false)
301301

302302
// Prepare the find arguments
303303
$arguments = [];
304-
empty($query) || $arguments[] = $query;
305-
empty($fields) || $arguments[] = $fields;
304+
$arguments[] = $query;
305+
$arguments[] = $fields;
306306

307307
// Wrap the find function so it is callable
308308
$function = [

0 commit comments

Comments
 (0)