Commit 12fb65aa authored by webchick's avatar webchick
Browse files

#705242 by moshe weitzman: Fixed _drupal_log_error() messy for CLI requests.

parent 29adf425
......@@ -1183,6 +1183,13 @@ function _drupal_log_error($error, $fatal = FALSE) {
drupal_add_http_header('500 Service unavailable (with message)');
if (drupal_is_cli()) {
if ($fatal) {
// When called from CLI, simply output a plain text message.
print html_entity_decode(strip_tags(t('%type: %message in %function (line %line of %file).', $error))). "\n";
if ($fatal) {
// When called from JavaScript, simply output the error message.
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