From: Máté Kocsis Date: Fri, 31 Jul 2020 08:01:08 +0000 (+0200) Subject: Fix the default value handling of imagegif() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d94d426f6078665eb9a93fc62da0bf51daced675;p=php Fix the default value handling of imagegif() --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 2cb33503fe..b015143ad8 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4162,7 +4162,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, zval *to_zval = NULL; if (image_type == PHP_GDIMG_TYPE_GIF) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|z", &imgind, gd_image_ce, &to_zval) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|z!", &imgind, gd_image_ce, &to_zval) == FAILURE) { RETURN_THROWS(); } } else if (image_type == PHP_GDIMG_TYPE_PNG) {