Skip to content

Commit 2dcae38

Browse files
committed
Merge pull request #252 from urmaul/master
Empty query error workaround
2 parents a2fb31d + d7fcd9a commit 2dcae38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EMongoDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ public function distinct($key, $query = array())
12841284
return Yii::app()->mongodb->command(array(
12851285
'distinct' => $this->collectionName(),
12861286
'key' => $key,
1287-
'query' => $query
1287+
'query' => $query ? $query : null
12881288
));
12891289
}
12901290

0 commit comments

Comments
 (0)