]> granicus.if.org Git - php/commitdiff
# Oops - functions with multiple optional args suck
authorRasmus Lerdorf <rasmus@php.net>
Mon, 13 Mar 2000 10:09:02 +0000 (10:09 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Mon, 13 Mar 2000 10:09:02 +0000 (10:09 +0000)
ext/gd/gd.c

index a14b8981f29e5b16df960049b4759962dee0d680..b471daa3722c0b31f637e6bf7b5c4795f78dcc6d 100644 (file)
@@ -708,7 +708,7 @@ PHP_FUNCTION(imagejpeg)
                }
        }
 
-       if (argc > 1 && strlen(fn)) {
+       if (argc > 1 && fn && strlen(fn)) {
                fp = fopen(fn, "wb");
                if (!fp) {
                        php_error(E_WARNING, "ImageJpeg: unable to open %s for writing", fn);