mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT In Debug::showError(), if error is displayed through ajax with CliDebugView, use plaintext output
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62468 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c57ce5f1a4
commit
0739b0520e
@ -303,6 +303,9 @@ class Debug {
|
|||||||
$errText = "$errtype: \"$errstr\" at line $errline of $errfile";
|
$errText = "$errtype: \"$errstr\" at line $errline of $errfile";
|
||||||
$errText = str_replace(array("\n","\r")," ",$errText);
|
$errText = str_replace(array("\n","\r")," ",$errText);
|
||||||
header("HTTP/1.0 500 $errText");
|
header("HTTP/1.0 500 $errText");
|
||||||
|
|
||||||
|
// if error is displayed through ajax with CliDebugView, use plaintext output
|
||||||
|
if(Director::is_ajax()) header('Content-Type: text/plain');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy error handling for customized prototype.js Ajax.Base.responseIsSuccess()
|
// Legacy error handling for customized prototype.js Ajax.Base.responseIsSuccess()
|
||||||
|
Loading…
Reference in New Issue
Block a user