Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  Fix bug #75437 Wrong reflection on imagewebp
This commit is contained in:
Christoph M. Becker 2017-10-25 12:56:25 +02:00
commit 9d59beb8ba
3 changed files with 20 additions and 0 deletions

1
NEWS
View File

@ -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

View File

@ -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, to)
ZEND_ARG_INFO(0, quality)
ZEND_END_ARG_INFO()
#endif

View File

@ -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===