From: Rasmus Lerdorf Date: Mon, 13 Mar 2000 10:09:02 +0000 (+0000) Subject: # Oops - functions with multiple optional args suck X-Git-Tag: PHP-4.0-RC1~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c192f526ea70f514b1f04f6745b0448d97e7942;p=php # Oops - functions with multiple optional args suck --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index a14b8981f2..b471daa372 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -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);