From 1528a3d1fb0ed8450c4e8cd803b9ac1aa776e1a0 Mon Sep 17 00:00:00 2001 From: foobar Date: Tue, 4 Jun 2002 02:33:10 +0000 Subject: [PATCH] Fixed bug: #17535 --- ext/gd/gd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); } -- 2.40.0