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 a8870527a70758d83d4acfe1b65fe3fc94581359..515455d3dad516ed923bc2ccbe50499e55d62297 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 b6b45f165f07e5bae6bf4aab58c5bfe86507f4e5..32eb4eea6c5f58f9a454c53ade7d477f2cd3077c 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;