diff --git a/library/includes/page_header.php b/library/includes/page_header.php index c1ca64063..931ab6b5e 100644 --- a/library/includes/page_header.php +++ b/library/includes/page_header.php @@ -125,7 +125,8 @@ $template->assign_vars(array( // The following assigns all _common_ variables that may be used at any point in a template $template->assign_vars(array( 'SIMPLE_HEADER' => !empty($gen_simple_header), - 'CONTENT_ENCODING' => $bb_cfg['lang'][$userdata['user_lang']]['encoding'], + 'CONTENT_ENCODING' => isset($bb_cfg['lang'][$userdata['user_lang']]['encoding']) ? + $bb_cfg['lang'][$userdata['user_lang']]['encoding'] : 'utf-8', 'IN_ADMIN' => defined('IN_ADMIN'), 'SHOW_ADS' => (!$logged_in || isset($bb_cfg['show_ads_users'][$user->id]) || (!IS_AM && $user->show_ads)), diff --git a/library/includes/sessions.php b/library/includes/sessions.php index 8f8c7ffa4..21a0ee9d3 100644 --- a/library/includes/sessions.php +++ b/library/includes/sessions.php @@ -562,7 +562,8 @@ class user_common } require(LANG_DIR . 'main.php'); - setlocale(LC_ALL, $bb_cfg['lang'][$this->data['user_lang']]['locale']); + setlocale(LC_ALL, isset($bb_cfg['lang'][$this->data['user_lang']]['locale']) ? + $bb_cfg['lang'][$this->data['user_lang']]['locale'] : 'en_US.UTF-8'); $theme = setup_style(); $DeltaTime = new Date_Delta();