]> granicus.if.org Git - php/commitdiff
Don't explicitly set return value on ZPP/ZFR failure
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 12 Aug 2019 12:11:34 +0000 (14:11 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 12 Aug 2019 12:42:26 +0000 (14:42 +0200)
Failing `zend_parse_parameters()` and `zend_fetch_resource()` throw as
of PHP 8.0.0, so explicitly setting a return value is useless, and also
slightly confusing.

ext/gd/gd.c
ext/gd/gd_ctx.c

index 07fbe231b4dcd24b766d0221b91002437fff316c..35edc9403cdbe382fb4f70802748dc4318aff992 100644 (file)
@@ -1265,7 +1265,7 @@ PHP_FUNCTION(imagegrabwindow)
        gdImagePtr im = NULL;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &lwindow_handle, &client_area) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        window = (HWND) lwindow_handle;
index dcdf8ad803ccc56ce7e6bdef01177463470aa520..52265de4ba21dc9447369a72baf81e82d7658292 100644 (file)
@@ -120,7 +120,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
        }
 
        if ((im = (gdImagePtr)zend_fetch_resource(Z_RES_P(imgind), "Image", phpi_get_le_gd())) == NULL) {
-               RETURN_FALSE;
+               return;
        }
 
        if (image_type != PHP_GDIMG_TYPE_BMP && argc >= 3) {