com php-src: Fix bug #74031: NEWS ext/gd/gd.c ext/gd/tests/bug74031.phpt
| From: | Nikita Popov | Date: | Thu, 02 Feb 2017 17:13:53 +0000 |
| Subject: | com php-src: Fix bug #74031: NEWS ext/gd/gd.c ext/gd/tests/bug74031.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96990@lists.php.net to get a copy of this message | ||
Commit: acda2563cea2acacdb126a6c14a144a9bf52e3a3
Author: Matěj Humpál <finwe@finwe.info> Thu, 2 Feb 2017 10:24:00 +0100
Committer: Nikita Popov <nikita.ppv@gmail.com> Thu, 2 Feb 2017 18:13:53 +0100
Parents: a15bffd105ac28fd0dd9b596632dbf035238fda3
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=acda2563cea2acacdb126a6c14a144a9bf52e3a3
Log:
Fix bug #74031
Fix incorrect parameter count for imagepng function
Bugs:
https://bugs.php.net/74031
Changed paths:
M NEWS
M ext/gd/gd.c
A ext/gd/tests/bug74031.phpt
Diff:
diff --git a/NEWS b/NEWS
index 3d402c6..249830d 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ PHP NEWS
. Fixed bug #73807 (Performance problem with processing large post request).
(Nikita)
+- GD:
+ . Fixed bug #74031 (ReflectionFunction for imagepng is missing last two
+ parameters). (finwe)
+
- OpenSSL:
. Fixed bug #74022 (PHP Fast CGI crashes when reading from a pfx file).
(Anatol)
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 4f9e2f8..ec2a037 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -368,6 +368,8 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagepng, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, filename)
+ ZEND_ARG_INFO(0, quality)
+ ZEND_ARG_INFO(0, filters)
ZEND_END_ARG_INFO()
#endif
diff --git a/ext/gd/tests/bug74031.phpt b/ext/gd/tests/bug74031.phpt
new file mode 100644
index 0000000..e5d6d70
--- /dev/null
+++ b/ext/gd/tests/bug74031.phpt
@@ -0,0 +1,10 @@
+--TEST--
+(Bug #74031) ReflectionFunction for imagepng returns wrong number of parameters
+--FILE--
+<?php
+
+$ref = new ReflectionFunction('imagepng');
+var_dump(count($ref->getParameters()));
+?>
+--EXPECT--
+int(4)