From: Roland Häder Date: Mon, 30 Nov 2009 17:15:11 +0000 (+0000) Subject: Fixes for missing array elements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5faa2f01095c717ee2544716026ea414ed0b15ee;p=mailer.git Fixes for missing array elements --- diff --git a/inc/functions.php b/inc/functions.php index b61e863c5c..9e185ab1b5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -945,6 +945,9 @@ function redirectToUrl ($URL) { // Secure the URL against bad things such als HTML insertions and so on... $URL = secureString($URL); + // Set content-type here to fix a missing array element + setContentType('text/html'); + // Output new location link as anchor outputHtml('' . $URL . ''); } elseif (!headers_sent()) { @@ -3963,8 +3966,17 @@ function loadHtmlHeader () { // Adds page header and footer to output array element function addPageHeaderFooter () { + // Init output + $OUT = ''; + // Add them all together. This is maybe to simple - $GLOBALS['output'] = $GLOBALS['page_header'] . $GLOBALS['output'] . $GLOBALS['page_footer']; + foreach (array('page_header', 'output', 'page_footer') as $pagePart) { + // Add page part if set + if (isset($GLOBALS[$pagePart]])) $OUT .= $GLOBALS[$pagePart]; + } // END - foreach + + // Transfer $OUT to 'output' + $GLOBALS['output'] = $OUT; } // Generates meta description for current module and 'what' value