Skip to content

Commit

Permalink
Fix bug #75437 Wrong reflection on imagewebp
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa authored and cmb69 committed Oct 25, 2017
1 parent 9fbf13a commit 0fbb9f3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 18 additions & 0 deletions ext/gd/tests/bug75437.phpt
Original file line number Diff line number Diff line change
@@ -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===

0 comments on commit 0fbb9f3

Please sign in to comment.