mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #1944 from patbolo/bugfix/debug-no-controller
FIX Avoid unnecessary user_error when no controller set for friendly err...
This commit is contained in:
commit
2beb3519e4
@ -360,7 +360,7 @@ class Debug {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!headers_sent()) {
|
if(!headers_sent()) {
|
||||||
$currController = Controller::curr();
|
$currController = Controller::has_curr() ? Controller::curr() : null;
|
||||||
// Ensure the error message complies with the HTTP 1.1 spec
|
// Ensure the error message complies with the HTTP 1.1 spec
|
||||||
$msg = strip_tags(str_replace(array("\n", "\r"), '', $friendlyErrorMessage));
|
$msg = strip_tags(str_replace(array("\n", "\r"), '', $friendlyErrorMessage));
|
||||||
if($currController) {
|
if($currController) {
|
||||||
|
Loading…
Reference in New Issue
Block a user