Skip to content

Commit 86a61ab

Browse files
committed
Fix for issue #1276
1 parent 8c17827 commit 86a61ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,12 @@ protected function compileWheres()
910910
$where['value'] = new UTCDateTime($where['value']->getTimestamp() * 1000);
911911
}
912912
}
913+
} elseif (isset($where['values'])) {
914+
array_walk_recursive($where['values'], function (&$item, $key) {
915+
if ($item instanceof DateTime) {
916+
$item = new UTCDateTime($item->getTimestamp() * 1000);
917+
}
918+
});
913919
}
914920

915921
// The next item in a "chain" of wheres devices the boolean of the

0 commit comments

Comments
 (0)