default:
// Huh, something goes wrong or maybe you have edited config.php ???
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid renderer %s detected.", getConfig('OUTPUT_MODE')));
app_die(__FUNCTION__, __LINE__, "<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}");
break;
}
// Output error messages in a fasioned way and die...
function app_die ($F, $L, $msg) {
- // Load header
- loadIncludeOnce('inc/header.php');
+ // Check if Script is already dieing and not let it kill itself another 1000 times
+ if (!isset($GLOBALS['app_died'])) {
+ // Make sure, that the script realy realy diese here and now
+ $GLOBALS['app_died'] = true;
- // Prepare message for output
- $msg = sprintf(getMessage('MXCHANGE_HAS_DIED'), basename($F), $L, $msg);
+ // Load header
+ loadIncludeOnce('inc/header.php');
- // Load the message template
- LOAD_TEMPLATE('admin_settings_saved', false, $msg);
+ // Prepare message for output
+ $msg = sprintf(getMessage('MXCHANGE_HAS_DIED'), basename($F), $L, $msg);
- // Load footer
- loadIncludeOnce('inc/footer.php');
+ // Load the message template
+ LOAD_TEMPLATE('admin_settings_saved', false, $msg);
- // Exit explicitly
- shutdown();
+ // Load footer
+ loadIncludeOnce('inc/footer.php');
+
+ // Exit explicitly
+ shutdown();
+ } else {
+ // Script tried to kill itself twice
+ debug_report_bug('Script wanted to kill itself more than once! Raw message=' . $msg . ', file/function=' . $F . ', line=' . $L);
+ }
}
// Display parsing time and number of SQL queries in footer