Skip to content

Commit 0fbb9f3

Browse files
villfacmb69
authored andcommitted
Fix bug #75437 Wrong reflection on imagewebp
1 parent 9fbf13a commit 0fbb9f3

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ PHP NEWS
2121

2222
- GD:
2323
. Fixed bug #65148 (imagerotate may alter image dimensions). (cmb)
24+
. Fixed bug #75437 (Wrong reflection on imagewebp). (Fabien Villepinte)
2425

2526
- intl:
2627
. Fixed bug #75317 (UConverter::setDestinationEncoding changes source instead

ext/gd/gd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ ZEND_END_ARG_INFO()
377377
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewebp, 0, 0, 1)
378378
ZEND_ARG_INFO(0, im)
379379
ZEND_ARG_INFO(0, filename)
380+
ZEND_ARG_INFO(0, quality)
380381
ZEND_END_ARG_INFO()
381382
#endif
382383

ext/gd/tests/bug75437.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Bug #75437 Wrong reflection on imagewebp
3+
--SKIPIF--
4+
if (!extension_loaded('reflection')) die('skip reflection not available');
5+
if (!extension_loaded('gd')) die('skip gd extension not available');
6+
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) die("skip test requires GD 2.2.0 or higher");
7+
if (!function_exists('imagewebp')) die('skip WebP support not available');
8+
--FILE--
9+
<?php
10+
$rf = new ReflectionFunction('imagewebp');
11+
var_dump($rf->getNumberOfParameters());
12+
var_dump($rf->getNumberOfRequiredParameters());
13+
?>
14+
===DONE===
15+
--EXPECT--
16+
int(3)
17+
int(1)
18+
===DONE===

0 commit comments

Comments
 (0)