PHP notice

Undefined index: HTTP_ACCEPT_LANGUAGE

/home/uswhuuln/domains/waldorff.gmbh/public_html/protected/controllers/SiteController.php(188)

176                         $model->addError('password', 'Błąd podczas zapisywania hasła. Skontaktuj się z administratorem.');
177                     }
178                 } else {
179                     $model->addError('oldPassword', 'Stare hasło jest niepoprawne.');
180                 }
181             }
182         }
183         $this->render('passwordForm', array('success' => $success, 'model' => $model));
184     }
185 
186     public function actionIndex() {
187 
188         $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
189         switch ($lang) {
190             case "pl":
191                 $this->redirect(array('/site/renderPage', 'key' => 'pl'));
192                 exit;
193             case "en":
194                 $this->redirect(array('/site/renderPage', 'key' => 'en'));
195                 exit;
196             default:
197                 $this->redirect(array('/site/renderPage', 'key' => 'de'));
198                 exit;
199         }
200         $this->redirect(array('/site/renderPage', 'key' => 'de'));

Stack Trace

#14
+
 /home/uswhuuln/domains/waldorff.gmbh/public_html/index.php(18): CApplication->run()
13 defined('YII_DEBUG') or define('YII_DEBUG',true);
14 // specify how many levels of call stack should be shown in each log message
15 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
2024-03-29 03:19:06 Apache/2 Yii Framework/1.1.14