We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 785d602 commit 3a1b66aCopy full SHA for 3a1b66a
src/Jenssegers/Mongodb/Collection.php
@@ -2,6 +2,7 @@
2
3
use Exception;
4
use MongoDB\Collection as MongoCollection;
5
+use MongoDB\BSON\ObjectID;
6
7
class Collection
8
{
@@ -48,13 +49,14 @@ public function __call($method, $parameters)
48
49
50
$query = [];
51
- // Convert the query paramters to a json string.
52
+ // Convert the query parameters to a json string.
53
array_walk_recursive($parameters, function (&$item, $key) {
- if ($item instanceof \MongoDB\BSON\ObjectID) {
54
+ if ($item instanceof ObjectID) {
55
$item = (string) $item;
56
}
57
});
58
59
60
foreach ($parameters as $parameter) {
61
try {
62
$query[] = json_encode($parameter);
0 commit comments