summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Fitch <willfitch@php.net>2014-01-18 11:57:34 -0500
committerWill Fitch <willfitch@php.net>2014-01-18 11:57:34 -0500
commit4e5195f82cde3bb16cfe078d06a783ffec267c25 (patch)
treedae63695caaab0c86fa79b1a7462ce5a7551c74f
parent89eab884d9aec3a023ac56289974647c446a0f60 (diff)
parenta540c5733113ed08f63244492c6a3be847916805 (diff)
downloadphp-git-4e5195f82cde3bb16cfe078d06a783ffec267c25.tar.gz
Merge branch 'PHP-5.6'
* PHP-5.6: Fix bug #66509: copy() arginfo incorrect since 5.4
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/tests/file/bug66509.phpt15
2 files changed, 16 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 4604f60adb..6409ff37d8 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1216,7 +1216,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 0000000000..0e414f2321
--- /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)