Skip to content

Commit acda256

Browse files
finwenikic
authored andcommitted
Fix bug #74031
Fix incorrect parameter count for imagepng function
1 parent a15bffd commit acda256

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ PHP NEWS
66
. Fixed bug #73807 (Performance problem with processing large post request).
77
(Nikita)
88

9+
- GD:
10+
. Fixed bug #74031 (ReflectionFunction for imagepng is missing last two
11+
parameters). (finwe)
12+
913
- OpenSSL:
1014
. Fixed bug #74022 (PHP Fast CGI crashes when reading from a pfx file).
1115
(Anatol)

ext/gd/gd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ ZEND_END_ARG_INFO()
368368
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagepng, 0, 0, 1)
369369
ZEND_ARG_INFO(0, im)
370370
ZEND_ARG_INFO(0, filename)
371+
ZEND_ARG_INFO(0, quality)
372+
ZEND_ARG_INFO(0, filters)
371373
ZEND_END_ARG_INFO()
372374
#endif
373375

ext/gd/tests/bug74031.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
(Bug #74031) ReflectionFunction for imagepng returns wrong number of parameters
3+
--FILE--
4+
<?php
5+
6+
$ref = new ReflectionFunction('imagepng');
7+
var_dump(count($ref->getParameters()));
8+
?>
9+
--EXPECT--
10+
int(4)

0 commit comments

Comments
 (0)