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

index 464e7e472903eb748dd9f827316e3e29f2197a39..45543878027166f1ced7a44d4537cfd78a98c7ee 100644 (file)
@@ -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();
        }