1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00

Fix of Bug #74383: Wrong reflection on Phar::running

This commit is contained in:
Mitch Hagstrand
2017-04-09 15:30:35 -07:00
committed by Joe Watkins
parent 9c7cb2cdcd
commit 775afd5e2d
3 changed files with 24 additions and 1 deletions
+3
View File
@@ -18,6 +18,9 @@ PHP NEWS
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
seconds). (Moritz Fain)
- phar:
. Fixed reflection on Phar::isRunning parameters. (mhagstrand)
13 Apr 2017 PHP 7.0.18
- Core:
+1 -1
View File
@@ -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()
+20
View File
@@ -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