From 65ba529135f31dfd36b4471588f45f8687cc1aca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 28 Feb 2009 23:35:51 +0000 Subject: [PATCH] Rewritten/fixed (damn, missed them...) --- inc/fatal_errors.php | 4 ++-- inc/functions.php | 5 +++++ inc/install-inc.php | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php index 52323fe8c8..98f8a8c608 100644 --- a/inc/fatal_errors.php +++ b/inc/fatal_errors.php @@ -46,7 +46,7 @@ if (getTotalFatalErrors() > 0) { if (isBooleanConstantAndTrue('mxchange_installing')) { // While we are installing ouput other header than while it is installed... :-) $OUT = ""; - foreach ($FATAL as $key => $value) { + foreach (getFatalArray() as $key => $value) { // Prepare content for the template $content = array( 'key' => ($key + 1), @@ -62,7 +62,7 @@ if (getTotalFatalErrors() > 0) { } elseif (isBooleanConstantAndTrue('mxchange_installed')) { // Display all runtime fatal errors $OUT = ""; - foreach ($FATAL as $key => $value) { + foreach (getFatalArray() as $key => $value) { // Prepare content for the template $content = array( 'key' => ($key + 1), diff --git a/inc/functions.php b/inc/functions.php index 645cffbbe1..e04576056a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -186,6 +186,11 @@ function initFatalMessages () { $GLOBALS['fatal_messages'] = array(); } +// Getter for whole fatal error messages +function getFatalArray () { + return $GLOBALS['fatal_messages']; +} + // Add a fatal error message to the queue array function addFatalMessage ($message, $extra="") { if (is_array($extra)) { diff --git a/inc/install-inc.php b/inc/install-inc.php index a6fbd91f2b..6613994455 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -99,7 +99,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_"; if (getTotalFatalErrors() > 0) { OUTPUT_HTML(""); - foreach ($FATAL as $key => $err) { + foreach (getFatalArray() as $key => $err) { OUTPUT_HTML(" · {--FATAL_NO--}".($key + 1).": ".$err."
"); } OUTPUT_HTML("

"); @@ -338,7 +338,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT if (getTotalFatalErrors() > 0) { $OUT = ""; - foreach ($FATAL as $value) { + foreach (getFatalArray() as $value) { $OUT .= "
  • ".$value."
  • \n"; } // END foreach define('__FATAL_ERROR_LI', $OUT); -- 2.39.2