Possible fix for nested bug, see bug ticket #157
authorRoland Häder <roland@mxchange.org>
Thu, 3 Dec 2009 23:25:13 +0000 (23:25 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 3 Dec 2009 23:25:13 +0000 (23:25 +0000)
inc/functions.php
inc/request-functions.php

index a887052..515455d 100644 (file)
@@ -2281,6 +2281,12 @@ function app_die ($F, $L, $message) {
                // Make sure, that the script realy realy diese here and now
                $GLOBALS['app_died'] = true;
 
+               // Set content type if not set
+               if (!isContentTypeSet()) {
+                       // text/html is the right one
+                       setContentType('text/html');
+               } // END - if
+
                // Load header
                loadIncludeOnce('inc/header.php');
 
index b6b45f1..32eb4ee 100644 (file)
@@ -228,6 +228,11 @@ function isFormSent () {
        return isPostRequestParameterSet('ok');
 }
 
+// Checks if 'content_type' is set
+function isContentTypeSet () {
+       return isset($GLOBALS['content_type']);
+}
+
 // Setter for content type
 function setContentType ($contentType) {
        $GLOBALS['content_type'] = (string) $contentType;