From: foobar Date: Tue, 4 Jun 2002 02:33:10 +0000 (+0000) Subject: Fixed bug: #17535 X-Git-Tag: RELEASE_0_90~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1528a3d1fb0ed8450c4e8cd803b9ac1aa776e1a0;p=php Fixed bug: #17535 --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 464e7e4729..4554387802 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1137,8 +1137,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, FILE * fp = NULL; 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(); }