Skip to content

Commit

Permalink
Merge branch 'PHP-7.1' into PHP-7.2
Browse files Browse the repository at this point in the history
* PHP-7.1:
  Fix bug #75437 Wrong reflection on imagewebp
  • Loading branch information
cmb69 committed Oct 25, 2017
2 parents 58ccfb0 + 9d59beb commit c78813a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.2.0RC6

- GD:
. Fixed bug #75437 (Wrong reflection on imagewebp). (Fabien Villepinte)

26 Oct 2017, PHP 7.2.0RC5

Expand Down
1 change: 1 addition & 0 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewebp, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, to)
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 c78813a

Please sign in to comment.