# Oops - functions with multiple optional args suck

This commit is contained in:
Rasmus Lerdorf 2000-03-13 10:09:02 +00:00
parent 70eb0c78f8
commit 9c192f526e

View 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);