PHP warning

Creating default object from empty value

/var/www/lstgroup/data/www/lst-group.ru/protected/components/GeoParam.php(225)

213                             //$cookie->expire = time()+60*60*24;
214                             Yii::app()->request->cookies['domainID'] = $cookie;
215                         }
216                         
217                         if ($model->redirect) {
218                             //перенаправление
219                             $regions = NewStates::model()->findByPk($model->stateID);
220                             header('HTTP/1.1 301 Moved Permanently');
221                             header('Location: http://'.$regions->stateDomain.'.lst-group'.$this->zone.$_SERVER['REQUEST_URI']);
222                             exit();
223                         }
224 
225                         $model->name = 'city';
226                         $this->module = 'geoLocation';
227                     }
228                 }
229                 if($model and $model->active == 1){
230                     if(!$model->langDefault){
231                         //$country = NewCountries::model()->findByPk($model->countryID, array('select'=>'langPack, langDefault'));
232                         
233                         if(empty($country))
234                             $country = NewCountries::model()->findByAttributes(array('countryDomain'=>'lst-group'.$zone), array('select'=>'countryID, h1, currencyType, langPack, langDefault, YandexCode, GoogleCode, textCounter'));
235                         
236                         if($country->countryID != $model->countryID){
237                             header("HTTP/1.0 404 Not Found");

Stack Trace

#5
+
 /var/www/lstgroup/data/www/lst-group.ru/index.php(17): YiiBase::createWebApplication("/var/www/lstgroup/data/www/lst-group.ru/protected/config/main.ph...")
12 define('HOST_SITE', "lst-group.ru");
13 // remove the following line when in production mode
14 defined('YII_DEBUG') or define('YII_DEBUG', true); 
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
18 
19 //exit(include_show());
20 ?>
2024-03-29 18:36:28 Apache/2.2.15 (CentOS) Yii Framework/1.1.14