Skip to content

Commit 767e6d2

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix bug #66509: copy() arginfo incorrect since 5.4 Conflicts: NEWS
2 parents 7f0aff5 + 5b906ce commit 767e6d2

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2014, PHP 5.5.9
44

5+
- Core:
6+
. Fixed bug #66509 (copy() arginfo has changed starting from 5.4). (willfitch)
7+
58
- GD:
69
. Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()).
710
(Laruence, Remi)

ext/standard/basic_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ ZEND_END_ARG_INFO()
12141214
ZEND_BEGIN_ARG_INFO(arginfo_fstat, 0)
12151215
ZEND_ARG_INFO(0, fp)
12161216
ZEND_END_ARG_INFO()
1217-
ZEND_BEGIN_ARG_INFO(arginfo_copy, 0)
1217+
ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2)
12181218
ZEND_ARG_INFO(0, source_file)
12191219
ZEND_ARG_INFO(0, destination_file)
12201220
ZEND_ARG_INFO(0, context)

ext/standard/tests/file/bug66509.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Bug #66509 (copy() showing $context parameter as required)
3+
--FILE--
4+
<?php
5+
6+
$r = new \ReflectionFunction('copy');
7+
8+
foreach($r->getParameters() as $p) {
9+
var_dump($p->isOptional());
10+
}
11+
?>
12+
--EXPECT--
13+
bool(false)
14+
bool(false)
15+
bool(true)

0 commit comments

Comments
 (0)