PHP Error

Description

Undefined index: HTTP_ACCEPT_LANGUAGE

Source File

/var/www/html/Pesquisas/giars/protected/controllers/MembrosController.php(55)

00043:             ),
00044:         );
00045:     }
00046:         
00047:         
00048:         /**
00049:      * Lists all models.
00050:      */
00051:     public function actionIndex()
00052:     {                
00053:                 $Idioma = Yii::app()->session['Idioma'];
00054:                 if(!$Idioma){ // depois tenta pegar o idioma pelo navegador
00055: $Idioma = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
00056: $Idioma = strtolower(substr(chop($Idioma[0]),0,2)); 00057: } 00058: 00059: if( !($Idioma=="pt" || $Idioma=="en" || $Idioma=="es") ){ 00060: $Idioma = "pt"; 00061: } 00062: 00063: $membros = array(null); 00064: $membros = Membros::model()->findAll(array('order'=>'ordem')); 00065: 00066: $this->render('index',array( 00067: 'membros'=>$membros, 'Idioma'=>$Idioma

Stack Trace

#0 /var/www/html/Pesquisas/giars/framework/web/actions/CInlineAction.php(57): MembrosController->actionIndex()
#1 /var/www/html/Pesquisas/giars/framework/web/CController.php(300): CInlineAction->run()
#2 /var/www/html/Pesquisas/giars/framework/web/filters/CFilterChain.php(133): MembrosController->runAction()
#3 /var/www/html/Pesquisas/giars/framework/web/filters/CFilter.php(41): CFilterChain->run()
#4 /var/www/html/Pesquisas/giars/framework/web/CController.php(1084): CAccessControlFilter->filter()
#5 /var/www/html/Pesquisas/giars/framework/web/filters/CInlineFilter.php(59): MembrosController->filterAccessControl()
#6 /var/www/html/Pesquisas/giars/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()
#7 /var/www/html/Pesquisas/giars/framework/web/CController.php(283): CFilterChain->run()
#8 /var/www/html/Pesquisas/giars/framework/web/CController.php(257): MembrosController->runActionWithFilters()
#9 /var/www/html/Pesquisas/giars/framework/web/CWebApplication.php(324): MembrosController->run()
#10 /var/www/html/Pesquisas/giars/framework/web/CWebApplication.php(121): CWebApplication->runController()
#11 /var/www/html/Pesquisas/giars/framework/base/CApplication.php(135): CWebApplication->processRequest()
#12 /var/www/html/Pesquisas/giars/index.php(13): CWebApplication->run()
2024-03-19 03:12:57 Apache/2.2.15 (CentOS) DAV/2 PHP/7.3.25 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips Yii Framework/1.1.5