Permalink
Browse files

FIX Avoid unnecessary user_error when no controller set for friendly …

…errors in Debug class
  • Loading branch information...
1 parent d5bcbbd commit 3de75f396e0f1e466910415f9fde45f081a2da8b @patbolo patbolo committed May 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 dev/Debug.php
View
2 dev/Debug.php
@@ -360,7 +360,7 @@ public static function friendlyError($statusCode=500, $friendlyErrorMessage=null
}
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) {

0 comments on commit 3de75f3

Please sign in to comment.