Skip to content

Commit

Permalink
Merged pull request #684
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Dec 1, 2017
2 parents f6f455a + 1caffe0 commit ea4d10a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/BSON/UTCDateTime.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static PHP_METHOD(UTCDateTime, unserialize)
} /* }}} */

/* {{{ MongoDB\BSON\UTCDateTime function entries */
ZEND_BEGIN_ARG_INFO_EX(ai_UTCDateTime___construct, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(ai_UTCDateTime___construct, 0, 0, 0)
ZEND_ARG_INFO(0, milliseconds)
ZEND_END_ARG_INFO()

Expand Down
12 changes: 12 additions & 0 deletions tests/bson/bug1053.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--TEST--
PHPC-1053: MongoDB\BSON\UTCDateTime's constructor has argument defined as required
--FILE--
<?php
$reflection = new ReflectionMethod(MongoDB\BSON\UTCDateTime::class, '__construct');
var_dump($reflection->getParameters()[0]->isOptional());
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
bool(true)
===DONE===

0 comments on commit ea4d10a

Please sign in to comment.