X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=e50b598ef3d220c6d14fcbba8174b886635ce4cc;hp=c7064dccf77d16a91138714a7e402e26674855cd;hb=086762b9606889fbda59d946b7b557d764ec2c0e;hpb=b5c4533c99063b77da1655a1b023ffd0f81f12a5 diff --git a/inc/functions.php b/inc/functions.php index c7064dccf7..e50b598ef3 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3521,91 +3521,6 @@ function getMessageFromIndexedArray ($message, $pos, $array) { return $ret; } -// Handles fatal errors -function handleFatalErrors () { - // Do we have errors to handle and right output mode? - if ((getTotalFatalErrors() == 0) || (getOutputMode() != 0)) { - // Abort executing here - return false; - } // END - if - - // Set content type - setContentType('text/html'); - - // Load config here - loadIncludeOnce('inc/load_config.php'); - - // Set unset variable - if (empty($check)) $check = ''; - - // Default is none - $content = ''; - - // Installation phase or regular mode? - if ((isInstallationPhase())) { - // While we are installing ouput other header than while it is installed... :-) - $OUT = ''; - foreach (getFatalArray() as $key => $value) { - // Prepare content for the template - $content = array( - 'key' => ($key + 1), - 'value' => $value - ); - - // Load row template - $OUT .= loadTemplate('install_fatal_row', true, $content); - } - - // Load main template - $content = loadTemplate('install_fatal_table', true, $OUT); - } elseif (isInstalled()) { - // Display all runtime fatal errors - $OUT = ''; - foreach (getFatalArray() as $key => $value) { - // Prepare content for the template - $content = array( - 'key' => ($key + 1), - 'value' => $value - ); - - // Load row template - $OUT .= loadTemplate('runtime_fatal_row', true, $content); - } - - // Load main template - $content = loadTemplate('runtime_fatal_table', true, $OUT); - } - - // Message to regular users (non-admin) - $CORR = getMessage('FATAL_REPORT_ERRORS'); - - // PHP warnings fixed - if ($check == 'done') { - if (isAdmin()) $CORR = getMessage('FATAL_CORRECT_ERRORS'); - } // END - if - - // Remember all in array - $content = array( - 'rows' => $content, - 'corr' => $CORR - ); - - // Load footer - loadIncludeOnce('inc/header.php'); - - // Load main template - loadTemplate('fatal_errors', false, $content); - - // Delete all to prevent double-display - initFatalMessages(); - - // Load footer - loadIncludeOnce('inc/footer.php'); - - // Abort here - shutdown(); -} - // Print code with line numbers function linenumberCode ($code) { if (!is_array($code)) $codeE = explode("\n", $code); else $codeE = $code;