]> granicus.if.org Git - php/commitdiff
Change the name of the second parameter of image writer functions
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 23 Jul 2016 13:36:49 +0000 (15:36 +0200)
committerStanislav Malyshev <stas@php.net>
Mon, 5 Sep 2016 07:43:30 +0000 (00:43 -0700)
As of PHP 5.4.0 the second parameter of all image writer functions (except
imagexbm) accepts also a stream resource. Therefore the parameter name
`filename` is inappropriate. We change it to `to` according to what it's
already called in _php_image_output_ctx().

We consider the reflection only related BC break acceptable for a minor version.

ext/gd/gd.c

index 25685999e75d82df170cb71451262ce5851dfbe6..ff0c5f875a0f6240450c695ee12393e74b5dd45e 100644 (file)
@@ -361,45 +361,45 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegif, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
 ZEND_END_ARG_INFO()
 
 #ifdef HAVE_GD_PNG
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagepng, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
 ZEND_END_ARG_INFO()
 #endif
 
 #ifdef HAVE_GD_WEBP
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewebp, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
 ZEND_END_ARG_INFO()
 #endif
 
 #ifdef HAVE_GD_JPG
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagejpeg, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
        ZEND_ARG_INFO(0, quality)
 ZEND_END_ARG_INFO()
 #endif
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewbmp, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
        ZEND_ARG_INFO(0, foreground)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegd, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegd2, 0, 0, 1)
        ZEND_ARG_INFO(0, im)
-       ZEND_ARG_INFO(0, filename)
+       ZEND_ARG_INFO(0, to)
        ZEND_ARG_INFO(0, chunk_size)
        ZEND_ARG_INFO(0, type)
 ZEND_END_ARG_INFO()
@@ -2681,7 +2681,7 @@ PHP_FUNCTION(imagexbm)
 }
 /* }}} */
 
-/* {{{ proto bool imagegif(resource im [, string filename])
+/* {{{ proto bool imagegif(resource im [, mixed to])
    Output GIF image to browser or file */
 PHP_FUNCTION(imagegif)
 {
@@ -2690,7 +2690,7 @@ PHP_FUNCTION(imagegif)
 /* }}} */
 
 #ifdef HAVE_GD_PNG
-/* {{{ proto bool imagepng(resource im [, string filename])
+/* {{{ proto bool imagepng(resource im [, mixed to])
    Output PNG image to browser or file */
 PHP_FUNCTION(imagepng)
 {
@@ -2701,7 +2701,7 @@ PHP_FUNCTION(imagepng)
 
 
 #ifdef HAVE_GD_WEBP
-/* {{{ proto bool imagewebp(resource im [, string filename[, int quality]] )
+/* {{{ proto bool imagewebp(resource im [, mixed to[, int quality]] )
    Output WEBP image to browser or file */
 PHP_FUNCTION(imagewebp)
 {
@@ -2712,7 +2712,7 @@ PHP_FUNCTION(imagewebp)
 
 
 #ifdef HAVE_GD_JPG
-/* {{{ proto bool imagejpeg(resource im [, string filename [, int quality]])
+/* {{{ proto bool imagejpeg(resource im [, mixed to [, int quality]])
    Output JPEG image to browser or file */
 PHP_FUNCTION(imagejpeg)
 {
@@ -2721,7 +2721,7 @@ PHP_FUNCTION(imagejpeg)
 /* }}} */
 #endif /* HAVE_GD_JPG */
 
-/* {{{ proto bool imagewbmp(resource im [, string filename [, int foreground]])
+/* {{{ proto bool imagewbmp(resource im [, mixed to [, int foreground]])
    Output WBMP image to browser or file */
 PHP_FUNCTION(imagewbmp)
 {
@@ -2729,7 +2729,7 @@ PHP_FUNCTION(imagewbmp)
 }
 /* }}} */
 
-/* {{{ proto bool imagegd(resource im [, string filename])
+/* {{{ proto bool imagegd(resource im [, mixed to])
    Output GD image to browser or file */
 PHP_FUNCTION(imagegd)
 {
@@ -2737,7 +2737,7 @@ PHP_FUNCTION(imagegd)
 }
 /* }}} */
 
-/* {{{ proto bool imagegd2(resource im [, string filename [, int chunk_size [, int type]]])
+/* {{{ proto bool imagegd2(resource im [, mixed to [, int chunk_size [, int type]]])
    Output GD2 image to browser or file */
 PHP_FUNCTION(imagegd2)
 {