Browse Source

! Remove extra hardcore debugging options that no-one knew about and that would likely give you so much more in your error log than what you were looking for anyway. Fixes #949

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
6275ac7ff2
2 changed files with 4 additions and 4 deletions
  1. 3 3
      Sources/Errors.php
  2. 1 1
      cron.php

+ 3 - 3
Sources/Errors.php

@@ -128,7 +128,7 @@ function fatal_error($error, $log = 'general')
 	if (empty($txt))
 		die($error);
 
-	setup_fatal_error_context($log || (!empty($modSettings['enableErrorLogging']) && $modSettings['enableErrorLogging'] == 2) ? log_error($error, $log) : $error, $error);
+	setup_fatal_error_context($log ? log_error($error, $log) : $error, $error);
 }
 
 /**
@@ -163,7 +163,7 @@ function fatal_lang_error($error, $log = 'general', $sprintf = array())
 
 	$reload_lang_file = true;
 	// Log the error in the forum's language, but don't waste the time if we aren't logging
-	if ($log || (!empty($modSettings['enableErrorLogging']) && $modSettings['enableErrorLogging'] == 2))
+	if ($log)
 	{
 		loadLanguage('Errors', $language);
 		$reload_lang_file = $language != $user_info['language'];
@@ -194,7 +194,7 @@ function error_handler($error_level, $error_string, $file, $line)
 	global $settings, $modSettings, $db_show_debug;
 
 	// Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.)
-	if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && (empty($modSettings['enableErrorLogging']) || $modSettings['enableErrorLogging'] != 2)))
+	if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && !empty($modSettings['enableErrorLogging'])))
 		return;
 
 	if (strpos($file, 'eval()') !== false && !empty($settings['current_include_filename']))

+ 1 - 1
cron.php

@@ -223,7 +223,7 @@ function error_handler_cron($error_level, $error_string, $file, $line)
 	global $modSettings, $db_show_debug;
 
 	// Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.)
-	if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && (empty($modSettings['enableErrorLogging']) || $modSettings['enableErrorLogging'] != 2)))
+	if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && !empty($modSettings['enableErrorLogging'])))
 		return;
 
 	$error_type = 'cron';