PHP warning

key_exists(): The first argument should be either a string or an integer

/var/www/user593/data/www/kopeyka.com.ua/protected/modules/translate/components/Ei18n.php(270)

258      */
259     public function getLanguage()
260     {
261         if ($this->_language !== null)
262             return $this->_language;
263         elseif (Yii::app()->getSession()->contains($this->getId()))
264             $language = Yii::app()->getSession()->get($this->getId());
265         elseif (Yii::app()->request->getParam($this->languageParameter))
266             $language = Yii::app()->request->getParam($this->languageParameter);
267         else
268             $language = Yii::app()->getRequest()->getPreferredLanguage();
269 
270         if (!key_exists($language, $this->languages))
271         {
272             if ($language === Yii::app()->sourceLanguage)
273                 $language = $this->defaultLanguage;
274             elseif (strpos($language, "_") !== false)
275             {
276                 $language = substr($language, 0, 2);
277                 if (!key_exists($language, $this->languages))
278                     $language = $this->defaultLanguage;
279             }
280         }
281         $this->_language = $language;
282 

Stack Trace

#0
+
 /var/www/user593/data/www/kopeyka.com.ua/protected/modules/translate/components/Ei18n.php(270): key_exists(false, array("en" => "English", "ru" => "Русский", "uk" => "Украинский"))
265         elseif (Yii::app()->request->getParam($this->languageParameter))
266             $language = Yii::app()->request->getParam($this->languageParameter);
267         else
268             $language = Yii::app()->getRequest()->getPreferredLanguage();
269 
270         if (!key_exists($language, $this->languages))
271         {
272             if ($language === Yii::app()->sourceLanguage)
273                 $language = $this->defaultLanguage;
274             elseif (strpos($language, "_") !== false)
275             {
#1
+
 /var/www/user593/data/www/kopeyka.com.ua/protected/modules/translate/components/Ei18n.php(103): Ei18n->getLanguage()
098 
099         if (empty($this->languageParameter))
100             $this->languageParameter = 'lang';
101 
102         if ($this->autoSetLanguage)
103             $this->setLanguage($this->getLanguage());
104 
105         if (!count($this->languages))
106         {
107             if (($sourceLanguage = Yii::app()->sourceLanguage) !== null)
108                 $this->languages[$sourceLanguage] = $sourceLanguage;
#7
+
 /var/www/user593/data/www/kopeyka.com.ua/public/index.php(43): YiiBase::createWebApplication(array("basePath" => "/var/www/user593/data/www/kopeyka.com.ua/protected/config/..", "defaultController" => "site", "name" => "ТС Копейка", "language" => "ru", ...))
38 
39 $confManager = new yupe\components\ConfigManager();
40 
41 require dirname(__FILE__).'/../vendor/autoload.php';
42 
43 Yii::createWebApplication($confManager->merge($base))->run();
2019-12-14 14:52:21 Apache/2.2.15 (Cloud Linux) Yii Framework/1.1.15