Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
drupal
Commits
a71b70f0
Commit
a71b70f0
authored
Apr 08, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#705242
by moshe weitzman: _drupal_log_error() messy for CLI requests.
parent
e8cfe921
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
includes/errors.inc
includes/errors.inc
+8
-0
No files found.
includes/errors.inc
View file @
a71b70f0
...
...
@@ -182,6 +182,14 @@ function _drupal_log_error($error, $fatal = FALSE) {
drupal_add_http_header
(
'Status'
,
'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
"
;
exit
;
}
}
if
(
isset
(
$_SERVER
[
'HTTP_X_REQUESTED_WITH'
])
&&
$_SERVER
[
'HTTP_X_REQUESTED_WITH'
]
==
'XMLHttpRequest'
)
{
if
(
$fatal
)
{
// When called from JavaScript, simply output the error message.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment