]> granicus.if.org Git - php/commitdiff
MFH: fix bug #17535
authorfoobar <sniper@php.net>
Tue, 4 Jun 2002 02:35:00 +0000 (02:35 +0000)
committerfoobar <sniper@php.net>
Tue, 4 Jun 2002 02:35:00 +0000 (02:35 +0000)
ext/gd/gd.c

index 6cfd3b5950f75a8a9f33219941edd1cacce9782c..f150ce8471e89c907991ec7557377b59f417005f 100644 (file)
@@ -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();
        }