summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Villepinte <fabien.villepinte@gmail.com>2017-10-25 12:06:54 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2017-10-25 12:54:05 +0200
commit0fbb9f343f9cff71532f28d86cfcc93f5fb3997e (patch)
treeaad22e388b82e7c15c914a325cd938b131a6e27a
parent9fbf13a4964351cf4569d53962703d59ddf2af49 (diff)
downloadphp-git-0fbb9f343f9cff71532f28d86cfcc93f5fb3997e.tar.gz
Fix bug #75437 Wrong reflection on imagewebp
-rw-r--r--NEWS1
-rw-r--r--ext/gd/gd.c1
-rw-r--r--ext/gd/tests/bug75437.phpt18
3 files changed, 20 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 8f89c9fd62..8bb9f28fc3 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ PHP NEWS
- GD:
. Fixed bug #65148 (imagerotate may alter image dimensions). (cmb)
+ . Fixed bug #75437 (Wrong reflection on imagewebp). (Fabien Villepinte)
- intl:
. Fixed bug #75317 (UConverter::setDestinationEncoding changes source instead
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index ec2a037357..c0829fb381 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -377,6 +377,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewebp, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, filename)
+ ZEND_ARG_INFO(0, quality)
ZEND_END_ARG_INFO()
#endif
diff --git a/ext/gd/tests/bug75437.phpt b/ext/gd/tests/bug75437.phpt
new file mode 100644
index 0000000000..c27e3237f6
--- /dev/null
+++ b/ext/gd/tests/bug75437.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #75437 Wrong reflection on imagewebp
+--SKIPIF--
+if (!extension_loaded('reflection')) die('skip reflection not available');
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) die("skip test requires GD 2.2.0 or higher");
+if (!function_exists('imagewebp')) die('skip WebP support not available');
+--FILE--
+<?php
+$rf = new ReflectionFunction('imagewebp');
+var_dump($rf->getNumberOfParameters());
+var_dump($rf->getNumberOfRequiredParameters());
+?>
+===DONE===
+--EXPECT--
+int(3)
+int(1)
+===DONE===