PHP Error key_exists() [<a href='function.key-exists'>function.key-exists</a>]: The first argument should be either a string or an integer /home/magaakro/domains/maga.com.pl/public_html/protected/modules/translate/components/MPTranslate.php(201) 189 $key=self::ID; 190 if(($language=@$this->_cache['language'])!==null) 191 return $language; 192 elseif(Yii::app()->getSession()->contains($key)) 193 $language=Yii::app()->getSession()->get($key); 194 elseif(isset($_POST[$key]) && !empty($_POST[$key])) 195 $language=$_POST[$key]; 196 elseif(isset($_GET[$key]) && !empty($_GET[$key])) 197 $language=$_GET[$key]; 198 else 199 $language=Yii::app()->getRequest()->getPreferredLanguage(); 200 201 if(!key_exists($language,$this->acceptedLanguages)){ 202 if($language===Yii::app()->sourceLanguage) 203 $language=$this->defaultLanguage; 204 elseif(strpos($language,"_")!==false){ 205 $language=substr($language,0,2); 206 if(!key_exists($language,$this->acceptedLanguages)) 207 $language=$this->defaultLanguage; 208 } 209 } 210 return $language; 211 } 212 /** 213 * Stack Trace #0 – /home/magaakro/domains/maga.com.pl/public_html/protected/modules/translate/components/MPTranslate.php(201): key_exists(false, array("en" => "English", "pl" => "Polish", "de" => "Deutsch", "ru" => "Russian", ...)) 196 elseif(isset($_GET[$key]) && !empty($_GET[$key])) 197 $language=$_GET[$key]; 198 else 199 $language=Yii::app()->getRequest()->getPreferredLanguage(); 200 201 if(!key_exists($language,$this->acceptedLanguages)){ 202 if($language===Yii::app()->sourceLanguage) 203 $language=$this->defaultLanguage; 204 elseif(strpos($language,"_")!==false){ 205 $language=substr($language,0,2); 206 if(!key_exists($language,$this->acceptedLanguages)) #1 – /home/magaakro/domains/maga.com.pl/public_html/protected/modules/translate/components/MPTranslate.php(54): MPTranslate->getLanguage() 49 */ 50 function init(){ 51 if(empty($this->defaultLanguage)) 52 $this->defaultLanguage=Yii::app()->getLanguage(); 53 if($this->autoSetLanguage) 54 $this->setLanguage($this->getLanguage()); 55 if(!count($this->acceptedLanguages)){ 56 if(($sourceLanguage=Yii::app()->sourceLanguage)!==null) 57 $this->acceptedLanguages[$sourceLanguage]=$sourceLanguage; 58 if(($targetLanguage=Yii::app()->getLanguage())!=null) 59 $this->acceptedLanguages[$targetLanguage]=$targetLanguage; #2 + /home/magaakro/domains/maga.com.pl/public_html/framework/base/CModule.php(372): MPTranslate->init() #3 – /home/magaakro/domains/maga.com.pl/public_html/protected/modules/translate/TranslateModule.php(30): CModule->getComponent("translate") 25 * get the translate component 26 * 27 * @return MPTranslate 28 */ 29 static function translator(){ 30 $component=Yii::app()->getComponent(self::$translateComponentId); 31 if($component===null) 32 throw new CException('Translate component must be defined'); 33 return $component; 34 } 35 static function __callStatic($method,$args){ #4 + /home/magaakro/domains/maga.com.pl/public_html/protected/modules/translate/TranslateModule.php(39): TranslateModule::translator() #5 unknown(0): TranslateModule::missingTranslation(CMissingTranslationEvent) #6 + /home/magaakro/domains/maga.com.pl/public_html/framework/base/CComponent.php(569): call_user_func(array("TranslateModule", "missingTranslation"), CMissingTranslationEvent) #7 + /home/magaakro/domains/maga.com.pl/public_html/framework/i18n/CMessageSource.php(124): CComponent->raiseEvent("onMissingTranslation", CMissingTranslationEvent) #8 + /home/magaakro/domains/maga.com.pl/public_html/framework/i18n/CMessageSource.php(108): CMessageSource->onMissingTranslation(CMissingTranslationEvent) #9 + /home/magaakro/domains/maga.com.pl/public_html/framework/i18n/CMessageSource.php(84): CMessageSource->translateMessage("home", "Nowości", "pl") #10 + /home/magaakro/domains/maga.com.pl/public_html/framework/YiiBase.php(578): CMessageSource->translate("home", "Nowości", null) #11 + /home/magaakro/domains/maga.com.pl/public_html/themes/spdesign/views/layouts/home.php(6): YiiBase::t("home", "Nowości") #12 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CBaseController.php(119): require("/home/magaakro/domains/maga.com.pl/public_html/themes/spdesign/v...") #13 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CBaseController.php(88): CBaseController->renderInternal("/home/magaakro/domains/maga.com.pl/public_html/themes/spdesign/v...", array("content" => " <div class="left"> <h2>Strona Główna</h2> </div> <div class..."), true) #14 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CController.php(781): CBaseController->renderFile("/home/magaakro/domains/maga.com.pl/public_html/themes/spdesign/v...", array("content" => " <div class="left"> <h2>Strona Główna</h2> </div> <div class..."), true) #15 + /home/magaakro/domains/maga.com.pl/public_html/protected/controllers/PageController.php(106): CController->render("view", array("model" => Page, "images" => array(), "files" => array(), "multimedia" => array("music" => array(), "video" => array(), "embed" => array()), ...)) #16 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/actions/CInlineAction.php(50): PageController->actionView() #17 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CController.php(300): CInlineAction->runWithParams(array("slug" => "strona-glowna")) #18 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction) #19 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/filters/CFilter.php(41): CFilterChain->run() #20 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CController.php(1144): CFilter->filter(CFilterChain) #21 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain) #22 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain) #23 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CController.php(283): CFilterChain->run() #24 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array("accessControl")) #25 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CWebApplication.php(277): CController->run("view") #26 + /home/magaakro/domains/maga.com.pl/public_html/framework/web/CWebApplication.php(136): CWebApplication->runController("page/view/slug/strona-glowna") #27 + /home/magaakro/domains/maga.com.pl/public_html/framework/base/CApplication.php(158): CWebApplication->processRequest() #28 + /home/magaakro/domains/maga.com.pl/public_html/index.php(21): CApplication->run() 2017-09-25 02:47:55 LiteSpeed Yii Framework/1.1.8