FIX Avoid unnecessary user_error when no controller set for friendly errors in Debug class

This commit is contained in:
jean 2013-05-14 16:58:57 +12:00
parent d5bcbbd66a
commit 3de75f396e

View File

@ -360,7 +360,7 @@ class Debug {
}
if(!headers_sent()) {
$currController = Controller::curr();
$currController = Controller::has_curr() ? Controller::curr() : null;
// Ensure the error message complies with the HTTP 1.1 spec
$msg = strip_tags(str_replace(array("\n", "\r"), '', $friendlyErrorMessage));
if($currController) {