From db33a1db129e96480dccea3454546f405f7fa54e Mon Sep 17 00:00:00 2001 From: apotek Date: Thu, 17 May 2012 19:19:53 -0400 Subject: [PATCH] Issue #1587858: Ajax errors not respecting error_level setting. --- includes/errors.inc | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/errors.inc b/includes/errors.inc index f62bf06..9d0df05 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -230,8 +230,10 @@ function _drupal_log_error($error, $fatal = FALSE) { if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { if ($fatal) { - // When called from JavaScript, simply output the error message. - print t('%type: !message in %function (line %line of %file).', $error); + if (error_displayable($error)) { + // When called from JavaScript, simply output the error message. + print t('%type: !message in %function (line %line of %file).', $error); + } exit; } } -- 1.7.0.2