]> granicus.if.org Git - php/commitdiff
Fixed a crash in headers_sent(), that occures if
authorIlia Alshanetsky <iliaa@php.net>
Thu, 7 Nov 2002 00:23:58 +0000 (00:23 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 7 Nov 2002 00:23:58 +0000 (00:23 +0000)
php_get_output_start_filename() returns NULL.

ext/standard/head.c

index 87994bc3698a6ed58d7ecaaa6993c46be553e0bb..6223ea8d93aa182f9f33f4727f91f69b2b8b1718 100644 (file)
@@ -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;
        }