]> granicus.if.org Git - php/commitdiff
Fix bug #74031
authorMatěj Humpál <finwe@finwe.info>
Thu, 2 Feb 2017 09:24:00 +0000 (10:24 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 2 Feb 2017 17:13:53 +0000 (18:13 +0100)
Fix incorrect parameter count for imagepng function

NEWS
ext/gd/gd.c
ext/gd/tests/bug74031.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 3d402c67989b22d17cde2eb54356cba7b8b840e1..249830d26241ac20541ae7be0ad2231607bd09e1 100644 (file)
--- 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)
index 4f9e2f8fc613411b77b387f9014e254b79ee585a..ec2a037357de07233938967c7c3de553e817521f 100644 (file)
@@ -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 (file)
index 0000000..e5d6d70
--- /dev/null
@@ -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)