File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,18 @@ echo throws(function() {
1010}, 'MongoDB\Driver\Exception\InvalidArgumentException ' ), "\n" ;
1111
1212echo throws (function () {
13- new MongoDB \BSON \Timestamp (-2147483648 , 0 );
13+ /* I realise that "-2147483647 - 1" could be written as "-2147483648", *however*, PHP considers
14+ * the latter a floating point number, as it parses "-" and "2147483648" separately, and
15+ * "2147483648" doesn't fit in the 32-bit signed range. */
16+ new MongoDB \BSON \Timestamp (-2147483647 - 1 , 0 );
1417}, 'MongoDB\Driver\Exception\InvalidArgumentException ' ), "\n" ;
1518
1619echo throws (function () {
1720 new MongoDB \BSON \Timestamp (0 , -1 );
1821}, 'MongoDB\Driver\Exception\InvalidArgumentException ' ), "\n" ;
1922
2023echo throws (function () {
21- new MongoDB \BSON \Timestamp (0 , -2147483648 );
24+ new MongoDB \BSON \Timestamp (0 , -2147483647 - 1 );
2225}, 'MongoDB\Driver\Exception\InvalidArgumentException ' ), "\n" ;
2326
2427?>
You can’t perform that action at this time.
0 commit comments