From b801568bbb7507f3ba5f3f24e6ee37a7409d11d7 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 7 Nov 2002 00:23:58 +0000 Subject: [PATCH] Fixed a crash in headers_sent(), that occures if php_get_output_start_filename() returns NULL. --- ext/standard/head.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.50.1