]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorJoe Watkins <krakjoe@php.net>
Mon, 10 Apr 2017 05:28:43 +0000 (06:28 +0100)
committerJoe Watkins <krakjoe@php.net>
Mon, 10 Apr 2017 05:32:40 +0000 (06:32 +0100)
* PHP-7.0:
  Fix of Bug #74383: Wrong reflection on Phar::running

1  2 
NEWS
ext/phar/phar_object.c
ext/phar/tests/bug74383.phpt

diff --cc NEWS
index 732a076538749d925f205c30d4b7175eec3dc93c,0e3d3b1fd78959111c143fe0e1e5dff2013cf340..0dac949f6198215c2e286990ad51a2256f8274be
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -31,15 -18,12 +31,18 @@@ PH
    . Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
      seconds). (Moritz Fain)
  
 -  . Fixed reflection on Phar::isRunning parameters. (mhagstrand)
+ - phar:
++  . Fixed bug #74383 phar method parameters reflection correction. (mhagstrand)
++
 +- Standard:
 +  . Fixed bug #72071 (setcookie allows max-age to be negative). (Craig Duncan)
 +  . Fixed bug #74361 (Compaction in array_rand() violates COW). (Nikita)
  
 -13 Apr 2017 PHP 7.0.18
 +
 +13 Apr 2017, PHP 7.1.4
  
  - Core:
 +  . Fixed bug #74149 (static embed SAPI linkage error). (krakjoe)
    . Fixed bug #73370 (falsely exits with "Out of Memory" when using
      USE_ZEND_ALLOC=0). (Nikita)
    . Fixed bug #73960 (Leak with instance method calling static method with
index 00720385debaa44d01812c5c4cc28473bba55395,1799268297ada46a14261b7717420830a5e01516..ba0b0da41a2c8d3ec7df7c6d31aefff9cb0300f8
@@@ -5134,7 -5190,8 +5134,7 @@@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_web
        ZEND_ARG_INFO(0, rewrites)
  ZEND_END_ARG_INFO()
  
- ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 1)
 -PHAR_ARG_INFO
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 0)
        ZEND_ARG_INFO(0, retphar)
  ZEND_END_ARG_INFO()
  
index 0000000000000000000000000000000000000000,366c4fcb9b48c5e038d3507b3051bbac22a7ed9e..4257629ff561ea1c0bb4682d809e964a446dedef
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,20 +1,20 @@@
 -1
+ --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