com php-src: Fix bug #66509: copy() arginfo incorrect since 5.4: NEWS ext/standard/basic_functions.c ext/standard/tests/file/bu g66509.phpt

From: Date: Sat, 18 Jan 2014 16:25:53 +0000
Subject: com php-src: Fix bug #66509: copy() arginfo incorrect since 5.4: NEWS ext/standard/basic_functions.c ext/standard/tests/file/bu g66509.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75688@lists.php.net to get a copy of this message
Commit: 5b906ce6eb02118697c2f81d462ddfa724377fe8 Author: Will Fitch <willfitch@php.net> Sat, 18 Jan 2014 11:25:53 -0500 Parents: a218a8b9174e5daf8b34c4cb3eca23977e7f66cf Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5b906ce6eb02118697c2f81d462ddfa724377fe8 Log: Fix bug #66509: copy() arginfo incorrect since 5.4 Since 5.4, the ZEND_BEGIN_ARG_INFO_EX was replaced by non _EX, causing Reflection to assume the $context parameter is required. Bugs: https://bugs.php.net/66509 Changed paths: M NEWS M ext/standard/basic_functions.c A ext/standard/tests/file/bug66509..phpt Diff: diff --git a/NEWS b/NEWS index 81f88bf..00a0a94 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ PHP NEWS - Core: . Fixed bug #66286 (Incorrect object comparison with inheritance). (Nikita) + . Fixed bug #66509 (copy() arginfo has changed starting from 5.4). (willfitch) - Session: . Fixed bug #66481 (Calls to session_name() segfault when session.name is diff --git a/ext/standard/basic_functions..c b/ext/standard/basic_functions.c index 5f880d7..c013655 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1206,7 +1206,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_fstat, 0) ZEND_ARG_INFO(0, fp) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_copy, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2) ZEND_ARG_INFO(0, source_file) ZEND_ARG_INFO(0, destination_file) ZEND_ARG_INFO(0, context) diff --git a/ext/standard/tests/file/bug66509.phpt b/ext/standard/tests/file/bug66509.phpt new file mode 100644 index 0000000..0e414f2 --- /dev/null +++ b/ext/standard/tests/file/bug66509.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #66509 (copy() showing $context parameter as required) +--FILE-- +<?php + +$r = new \ReflectionFunction('copy'); + +foreach($r->getParameters() as $p) { + var_dump($p->isOptional()); +} +?> +--EXPECT-- +bool(false) +bool(false) +bool(true)

« previous php.cvs (#75688) next »