From: Ilia Alshanetsky Date: Thu, 7 Nov 2002 00:23:58 +0000 (+0000) Subject: Fixed a crash in headers_sent(), that occures if X-Git-Tag: php-4.3.0RC1~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b801568bbb7507f3ba5f3f24e6ee37a7409d11d7;p=php Fixed a crash in headers_sent(), that occures if php_get_output_start_filename() returns NULL. --- diff --git a/ext/standard/head.c b/ext/standard/head.c index 87994bc369..6223ea8d93 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -183,7 +183,11 @@ PHP_FUNCTION(headers_sent) ZVAL_LONG(arg2, line); case 1: zval_dtor(arg1); - ZVAL_STRING(arg1, file, 1); + if (file) { + ZVAL_STRING(arg1, file, 1); + } else { + ZVAL_STRING(arg1, "", 1); + } break; }