diff --git a/core/includes/errors.inc b/core/includes/errors.inc index cba08e2..41abccb 100644 --- a/core/includes/errors.inc +++ b/core/includes/errors.inc @@ -205,8 +205,11 @@ function _drupal_log_error($error, $fatal = FALSE) { } // Backtrace array is not a valid replacement value for t(). - $backtrace = $error['backtrace']; - unset($error['backtrace']); + $backtrace = FALSE; + if (isset($error['backtrace'])) { + $backtrace = $error['backtrace']; + unset($error['backtrace']); + } // When running inside the testing framework, we relay the errors // to the tested site by the way of HTTP headers. @@ -272,7 +275,7 @@ function _drupal_log_error($error, $fatal = FALSE) { // Check if verbose error reporting is on. $error_level = variable_get('error_level', ERROR_REPORTING_DISPLAY_ALL); - if ($error_level == ERROR_REPORTING_DISPLAY_VERBOSE) { + if ($backtrace && $error_level == ERROR_REPORTING_DISPLAY_VERBOSE) { // First trace is the error itself, already contained in the message. // While the second trace is the error source and also contained in the // message, the message doesn't contain argument values, so we output it