From a1e39392075de961780b0893ca1de747d4885b97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 3 Dec 2009 23:25:13 +0000 Subject: [PATCH] Possible fix for nested bug, see bug ticket #157 --- inc/functions.php | 6 ++++++ inc/request-functions.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/inc/functions.php b/inc/functions.php index a8870527a7..515455d3da 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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'); diff --git a/inc/request-functions.php b/inc/request-functions.php index b6b45f165f..32eb4eea6c 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -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; -- 2.39.5