From: foobar Date: Tue, 4 Jun 2002 02:35:00 +0000 (+0000) Subject: MFH: fix bug #17535 X-Git-Tag: php-4.2.3RC1~117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c50fdabdf506508374d9c2a9c08f0f081e2e9d5;p=php MFH: fix bug #17535 --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 6cfd3b5950..f150ce8471 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1145,8 +1145,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, int issock=0, socketd=0; int argc=ZEND_NUM_ARGS(); - if ((image_type == PHP_GDIMG_TYPE_GD2PART && argc != 4) || - argc != 1 || zend_get_parameters_ex(argc, &file, &srcx, &srcy, &width, &height) == FAILURE) { + if ((image_type == PHP_GDIMG_TYPE_GD2PART && argc != 5) || + (image_type != PHP_GDIMG_TYPE_GD2PART && argc != 1) || + zend_get_parameters_ex(argc, &file, &srcx, &srcy, &width, &height) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); }