diff options
author | Christoph M. Becker <cmb@php.net> | 2015-08-19 16:22:04 +0200 |
---|---|---|
committer | Christoph M. Becker <cmb@php.net> | 2015-08-19 16:23:16 +0200 |
commit | 484b92919bd3b06f3eae845bc1a592da58bef64e (patch) | |
tree | ef4fafe662db0fc2dab7aeedd92dcbfe7b5c66a3 | |
parent | b584b513983319be170f02828bc7c12850b40320 (diff) | |
download | php-git-484b92919bd3b06f3eae845bc1a592da58bef64e.tar.gz |
Fix #70303: Incorrect constructor reflection for ArrayObject
The first parameter of ArrayObject::__construct() is optional. Reflection
should reflect this.
-rw-r--r-- | ext/spl/spl_array.c | 4 | ||||
-rw-r--r-- | ext/spl/tests/bug70303.phpt | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 42490fc007..2c65210b98 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1842,8 +1842,8 @@ outexcept: } /* }}} */ -/* {{{ arginfo and function tbale */ -ZEND_BEGIN_ARG_INFO(arginfo_array___construct, 0) +/* {{{ arginfo and function table */ +ZEND_BEGIN_ARG_INFO_EX(arginfo_array___construct, 0, 0, 0) ZEND_ARG_INFO(0, array) ZEND_END_ARG_INFO() diff --git a/ext/spl/tests/bug70303.phpt b/ext/spl/tests/bug70303.phpt new file mode 100644 index 0000000000..059c370058 --- /dev/null +++ b/ext/spl/tests/bug70303.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #70303 (Incorrect constructor reflection for ArrayObject) +--FILE-- +<?php +$f = new ReflectionClass('ArrayObject'); +$c = $f->getConstructor(); +$params = $c->getParameters(); +$param = $params[0]; +var_dump($param->isOptional()); +?> +--EXPECT-- +bool(true) |