Commit 30291115 authored by catch's avatar catch

Issue #1587858 by apotek: Fixed AJAX alert dialogs respect neither...

Issue #1587858 by apotek: Fixed AJAX alert dialogs respect neither display_errors() ini.php setting or ['error_level()'] setting, exposing server info.
parent e6986e5a
......@@ -227,8 +227,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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment