From: Roland Häder Date: Thu, 3 Dec 2009 23:25:13 +0000 (+0000) Subject: Possible fix for nested bug, see bug ticket #157 X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=a1e39392075de961780b0893ca1de747d4885b97 Possible fix for nested bug, see bug ticket #157 --- 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;