Skip to content

Commit ea4d10a

Browse files
committed
Merged pull request #684
2 parents f6f455a + 1caffe0 commit ea4d10a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/BSON/UTCDateTime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static PHP_METHOD(UTCDateTime, unserialize)
396396
} /* }}} */
397397

398398
/* {{{ MongoDB\BSON\UTCDateTime function entries */
399-
ZEND_BEGIN_ARG_INFO_EX(ai_UTCDateTime___construct, 0, 0, 1)
399+
ZEND_BEGIN_ARG_INFO_EX(ai_UTCDateTime___construct, 0, 0, 0)
400400
ZEND_ARG_INFO(0, milliseconds)
401401
ZEND_END_ARG_INFO()
402402

tests/bson/bug1053.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
PHPC-1053: MongoDB\BSON\UTCDateTime's constructor has argument defined as required
3+
--FILE--
4+
<?php
5+
$reflection = new ReflectionMethod(MongoDB\BSON\UTCDateTime::class, '__construct');
6+
var_dump($reflection->getParameters()[0]->isOptional());
7+
?>
8+
===DONE===
9+
<?php exit(0); ?>
10+
--EXPECT--
11+
bool(true)
12+
===DONE===

0 commit comments

Comments
 (0)