diff --git a/application/core/LSYii_Application.php b/application/core/LSYii_Application.php index 12b4bea8aed..c6929af95b7 100644 --- a/application/core/LSYii_Application.php +++ b/application/core/LSYii_Application.php @@ -346,7 +346,8 @@ public function onException($event) } else { /* Here we have different possibility : maybe 400/401/403/404 with debug < 2 except for forced superadmin (currently : the 4 part don't show intersting information with debug*/ /* 500 always if debug and for (forced) superadmin even if no debug is set (and try to show complete error in this case (see issue by olle about white page and log */ - if ((Yii::app()->getConfig('debug')<1 /* || Permission::hasGlobalPermission('superadmin') */) || $event->exception->statusCode=='404') { + if ((Yii::app()->getConfig('debug')<1 /* || Permission::hasGlobalPermission('superadmin') */) + || (isset($event->exception->statusCode) && $event->exception->statusCode=='404')) { Yii::app()->setComponent('errorHandler', array( 'errorAction'=>'surveys/error', ));