From: Antony Dovgal Date: Tue, 22 May 2007 09:44:55 +0000 (+0000) Subject: fix #41442 (imagegd2() under output control) X-Git-Tag: RELEASE_1_4~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93b3bc490d9db13759ff6f3309f479539904b0f3;p=php fix #41442 (imagegd2() under output control) --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 464951b714..0b1d29edec 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2563,6 +2563,14 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char } (*func_p)(im, fp); break; +#ifdef HAVE_GD_GD2 + case PHP_GDIMG_TYPE_GD2: + if (quality == -1) { + quality = 128; + } + (*func_p)(im, fp, quality, type); + break; +#endif default: if (quality == -1) { quality = 128; diff --git a/ext/gd/tests/bug41442.phpt b/ext/gd/tests/bug41442.phpt new file mode 100644 index 0000000000..78a61bec95 --- /dev/null +++ b/ext/gd/tests/bug41442.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #41442 (imagegd2() under output control) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (gd) +resource(%d) of type (gd) +Done