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:
Sean Harvey 2013-05-13 22:14:30 -07:00
commit 2beb3519e4
1 changed files with 1 additions and 1 deletions

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) {