Skip to content

Commit 15f4bbf

Browse files
committed
Merge pull request mongodb#1328 from lindelius/fix-1276
Fix for issue mongodb#1276
2 parents 5049314 + 2b558d1 commit 15f4bbf

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
@@ -932,6 +932,12 @@ protected function compileWheres()
932932
$where['value'] = new UTCDateTime($where['value']->getTimestamp() * 1000);
933933
}
934934
}
935+
} elseif (isset($where['values'])) {
936+
array_walk_recursive($where['values'], function (&$item, $key) {
937+
if ($item instanceof DateTime) {
938+
$item = new UTCDateTime($item->getTimestamp() * 1000);
939+
}
940+
});
935941
}
936942

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

0 commit comments

Comments
 (0)