BUG If user is logged out getHtmlEditorConfigForCMS() gets called on non object

This can happen if the auto-logout feature logs a user out and the user then tries to open another admin or
do an pjax call.
This commit is contained in:
Stig Lindqvist 2014-07-17 14:45:22 +12:00
parent 830c10704c
commit ac64d258b7

View File

@ -267,7 +267,9 @@ class LeftAndMain extends Controller implements PermissionProvider {
if(empty($_REQUEST['executeForm']) && !$this->request->isAjax()) $this->extend('accessedCMS'); if(empty($_REQUEST['executeForm']) && !$this->request->isAjax()) $this->extend('accessedCMS');
// Set the members html editor config // Set the members html editor config
if(Member::currentUser()) {
HtmlEditorConfig::set_active(Member::currentUser()->getHtmlEditorConfigForCMS()); HtmlEditorConfig::set_active(Member::currentUser()->getHtmlEditorConfigForCMS());
}
// Set default values in the config if missing. These things can't be defined in the config // Set default values in the config if missing. These things can't be defined in the config
// file because insufficient information exists when that is being processed // file because insufficient information exists when that is being processed