From: Christoph M. Becker Date: Mon, 12 Aug 2019 12:11:34 +0000 (+0200) Subject: Don't explicitly set return value on ZPP/ZFR failure X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4281b1378e514a203aa69f1131838796caf000cc;p=php Don't explicitly set return value on ZPP/ZFR failure 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. --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 07fbe231b4..35edc9403c 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -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; diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index dcdf8ad803..52265de4ba 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -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) {