PHP Error

Creating default object from empty value

/var/data/hosting/fspm-ch/www/protected/controllers/SiteController.php(408)

396         {
397             $this->render("help");
398         }
399 
400         public function actionAds()
401         {
402             $this->render("ads");
403         }
404 
405         public function actionAd($id)
406         {
407             $model = Ads::model()->findByPk($id);
408             $model->Counter++;
409             $model->save();
410 
411             $this->redirect($model->Link);
412         }
413 
414         public function actionNews()
415         {
416             $news = News::model()->findAll(new CDbCriteria(array("order"=>"CreationDate DESC")));
417 
418             $this->render("news", array("news"=>$news));
419         }
420 

Stack Trace

#9
+
 /var/data/hosting/fspm-ch/www/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 07:33:14 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 Yii Framework/1.1.8