]> granicus.if.org Git - php/commitdiff
MFH
authorfoobar <sniper@php.net>
Wed, 12 Mar 2003 04:16:31 +0000 (04:16 +0000)
committerfoobar <sniper@php.net>
Wed, 12 Mar 2003 04:16:31 +0000 (04:16 +0000)
ext/gd/gd.c
ext/gd/gd_ctx.c

index d35210e8b80707e374a68e472e35c17be109c953..b35172082042db277ff2c44edaa0d4131f046150 100644 (file)
@@ -1578,7 +1578,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
                }
        }
 
-       if ((argc == 2) || (argc == 3 && Z_STRLEN_PP(file))) {
+       if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
                if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
                        RETURN_FALSE;
index 8d94224816f052784644f5e96a96c1712c50370a..89853c1e60d0128ca2fbc483c5dffb96db2f4d6d 100644 (file)
@@ -50,7 +50,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
                }
        }
 
-       if ((argc == 2) || (argc == 3 && Z_STRLEN_PP(file))) {
+       if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
                if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
                        RETURN_FALSE;