From 3de75f396e0f1e466910415f9fde45f081a2da8b Mon Sep 17 00:00:00 2001 From: jean Date: Tue, 14 May 2013 16:58:57 +1200 Subject: [PATCH] FIX Avoid unnecessary user_error when no controller set for friendly errors in Debug class --- dev/Debug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/Debug.php b/dev/Debug.php index be45b17c2..fc3512bb0 100644 --- a/dev/Debug.php +++ b/dev/Debug.php @@ -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) {