diff options
| -rw-r--r-- | ext/date/php_date.c | 2 | ||||
| -rw-r--r-- | ext/date/tests/bug70266.phpt | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index eeaed2b660..ee30071f54 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -381,7 +381,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_date_period_construct, 0, 0, 3) ZEND_ARG_INFO(0, end) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_date_interval_construct, 0, 0, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_date_interval_construct, 0, 0, 1) ZEND_ARG_INFO(0, interval_spec) ZEND_END_ARG_INFO() /* }}} */ diff --git a/ext/date/tests/bug70266.phpt b/ext/date/tests/bug70266.phpt new file mode 100644 index 0000000000..5eeebabab8 --- /dev/null +++ b/ext/date/tests/bug70266.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #70266 (DateInterval::__construct.interval_spec is not supposed to be optional) +--FILE-- +<?php +var_dump((new ReflectionParameter(['DateInterval', '__construct'], 0))->isOptional()); +?> +--EXPECT-- +bool(false) |
