Rewritten/fixed (damn, missed them...)
authorRoland Häder <roland@mxchange.org>
Sat, 28 Feb 2009 23:35:51 +0000 (23:35 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 28 Feb 2009 23:35:51 +0000 (23:35 +0000)
inc/fatal_errors.php
inc/functions.php
inc/install-inc.php

index 52323fe8c8dbe9caa09304a566c670689f9d0aee..98f8a8c6083070ab8a3b7896114f64c222bafa78 100644 (file)
@@ -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),
index 645cffbbe1e00f0e8fe26989ed1b432604406ca1..e04576056a34b1076468db2d895d1955ff75b1f5 100644 (file)
@@ -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)) {
index a6fbd91f2b21ac8c7951b2bc015e29537ec90989..6613994455a6a5085b056109ad1657c20656ac37 100644 (file)
@@ -99,7 +99,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_";
                if (getTotalFatalErrors() > 0) {
                        OUTPUT_HTML("<span class=\"install_fatal\">");
-                       foreach ($FATAL as $key => $err) {
+                       foreach (getFatalArray() as $key => $err) {
                                OUTPUT_HTML("  <strong>&middot;</strong>&nbsp;{--FATAL_NO--}".($key + 1).":&nbsp;".$err."<br />");
                        }
                        OUTPUT_HTML("</span><br />");
@@ -338,7 +338,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
 
                        if (getTotalFatalErrors() > 0) {
                                $OUT = "";
-                               foreach ($FATAL as $value) {
+                               foreach (getFatalArray() as $value) {
                                        $OUT .= "    <li>".$value."</li>\n";
                                } // END foreach
                                define('__FATAL_ERROR_LI', $OUT);