PHP notice

Undefined index: HTTP_ACCEPT_LANGUAGE

D:\php\nginx-1.2.4\yii\framework\web\CMsgController.php(39)

27     {
28         $lang = null;
29         if(isset($_REQUEST["lang"])&&$_REQUEST["lang"]!="")
30         {
31             Yii::app()->language=$_REQUEST["lang"];
32             setcookie("lang",$_REQUEST["lang"], time()+60*60*24*30);
33         }else if(isset($_COOKIE["lang"])&&$_COOKIE["lang"]!="")
34         {
35             Yii::app()->language=$_COOKIE["lang"];
36             setcookie("lang",$_COOKIE["lang"], time()+60*60*24*30);
37         }else
38         {
39             $lang=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
40             Yii::app()->language=strtolower(str_replace('-','_',$lang[0]));
41             setcookie("lang",Yii::app()->language, time()+60*60*24*30);
42         }
43     }
44 }
45 
46 ?>

Stack Trace

#6
+
 D:\php\nginx-1.2.4\yii\vgt\index.php(127): CApplication->run()
122 //        echo "You are not authorized to perform this action";
123 //        echo "the system is upgrading, please wait...";
124 //    }
125 //    else
126 //    {
127         Yii::createWebApplication($config)->run();
128 //    }
129 }
130 else
131 {
132     Yii::createWebApplication($config)->run();
2024-03-28 18:52:35 nginx/1.6.2 Yii Framework/1.1.12