mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX Avoid unnecessary user_error when no controller set for friendly errors in Debug class
This commit is contained in:
parent
d5bcbbd66a
commit
3de75f396e
@ -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…
x
Reference in New Issue
Block a user