PHP Error

Undefined index: HTTP_REFERER

/home/vlcgroup/public_html/protected/controllers/SiteController.php(43)

31             ),
32         );
33     }
34     
35     /*
36      * switch between vietnamese and english
37      */
38     public function actionSetLang($lang_id)
39     {
40         $lang = Languages::model()->findByPk($lang_id);
41         Yii::app()->session['lang'] = $lang->code;
42         Yii::app()->language = Yii::app()->session['lang'];
43         $this->redirect($_SERVER["HTTP_REFERER"]);
44     }
45 
46     /**
47      * This is the default 'index' action that is invoked
48      * when an action is not explicitly requested by users.
49      */
50     public function actionIndex()
51     {
52         if (!Yii::app()->session['lang'])
53         {
54             Languages::setLanguage();
55         }

Stack Trace

#9
+
 /home/vlcgroup/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-19 10:45:28 LiteSpeed Yii Framework/1.1.7