summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-04-10 14:41:29 +0800
committerXinchen Hui <laruence@gmail.com>2017-04-10 14:41:29 +0800
commit66411ee62ee8bd5e015c901092014dd9229fca01 (patch)
tree0b6d039e3781d8a7b46fa93d8bc0e0d182a50aed /ext
parentd2923ec1e5457e173f29bdd7f778346c39c952dd (diff)
parenta93832f414e8f962c754c305dbb59799014b46d6 (diff)
downloadphp-git-66411ee62ee8bd5e015c901092014dd9229fca01.tar.gz
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src: fix news Fix of Bug #74383: Wrong reflection on Phar::running
Diffstat (limited to 'ext')
-rw-r--r--ext/phar/phar_object.c2
-rw-r--r--ext/phar/tests/bug74383.phpt20
2 files changed, 21 insertions, 1 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 31d443cd43..1799268297 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -5191,7 +5191,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_webPhar, 0, 0, 0)
ZEND_END_ARG_INFO()
PHAR_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..366c4fcb9b
--- /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 \ No newline at end of file