diff options
author | Joe Watkins <krakjoe@php.net> | 2017-04-10 06:33:01 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-04-10 06:33:42 +0100 |
commit | b0f9dba2d97ddb794cb157e1276c3b608bc18277 (patch) | |
tree | 48486899584580c6874cd628e82c64153e33616c | |
parent | 2d21404e25174e5f804c897a8e9f289d8e7631b3 (diff) | |
parent | 9fe4d2d9cb52903decfb0177615dde35ec244111 (diff) | |
download | php-git-b0f9dba2d97ddb794cb157e1276c3b608bc18277.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
Fix of Bug #74383: Wrong reflection on Phar::running
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/phar/phar_object.c | 2 | ||||
-rw-r--r-- | ext/phar/tests/bug74383.phpt | 20 |
3 files changed, 24 insertions, 1 deletions
@@ -138,6 +138,9 @@ PHP NEWS - PDO_Sqlite . Switch to sqlite3_prepare_v2() and sqlite3_close_v2() functions (rasmus) +- phar: + . Fixed bug #74383 phar method parameters reflection correction. (mhagstrand) + - PHPDBG . Added extended_value to opcode dump output. (Sara) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 61c438f792..8e9233ae17 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -5134,7 +5134,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_webPhar, 0, 0, 0) ZEND_ARG_INFO(0, rewrites) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 1) +ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 0) ZEND_ARG_INFO(0, retphar) ZEND_END_ARG_INFO() diff --git a/ext/phar/tests/bug74383.phpt b/ext/phar/tests/bug74383.phpt new file mode 100644 index 0000000000..4257629ff5 --- /dev/null +++ b/ext/phar/tests/bug74383.phpt @@ -0,0 +1,20 @@ +--TEST-- +Phar: bug #74383: Wrong reflection on Phar::running +--SKIPIF-- +<?php if (!extension_loaded("phar") || !extension_loaded('reflection')) die("skip"); ?> +--FILE-- +<?php +$rc = new ReflectionClass(Phar::class); +$rm = $rc->getMethod("running"); +echo $rm->getNumberOfParameters(); +echo PHP_EOL; +echo $rm->getNumberOfRequiredParameters(); +echo PHP_EOL; +echo (int) $rm->getParameters()[0]->isOptional(); + +?> + +--EXPECT-- +1 +0 +1 |