summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2012-06-23 14:57:48 -0400
committerDavid Rothstein <drothstein@gmail.com>2012-06-23 14:57:48 -0400
commited197d6e346692433c89bb936e839fb77b2a2bb4 (patch)
tree2fe3b7c816c265a6fdc692cb7c7ea2b2604e2e6f /includes
parent399cf0a5df67847bcad38f6024efa7d44b8c97f9 (diff)
downloadbrdo-ed197d6e346692433c89bb936e839fb77b2a2bb4.tar.gz
brdo-ed197d6e346692433c89bb936e839fb77b2a2bb4.tar.bz2
Issue #1587858 by apotek: Fixed AJAX alert dialogs respect neither display_errors ini.php setting or $conf['error_level'] setting, exposing server info.
Diffstat (limited to 'includes')
-rw-r--r--includes/errors.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/errors.inc b/includes/errors.inc
index f62bf06a5..9d0df0544 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;
}
}