PHP warning

Creating default object from empty value

/home/crocus/public_html/protected/controllers/SiteController.php(309)

297             'pages'=>$pages
298         ));
299     }
300     
301     public function actionEvent()
302     {
303         $event = Event::model()->findByPk($_GET['id']);
304         
305         $description = strip_tags(html_entity_decode($event->brief));
306         if(strlen($description) > 300)
307             $description = substr($description, 0, strpos($description, ' ', 300)).'...';
308         
309         $event->seen++;
310         $event->save();
311         
312         if(isset($_GET['f'])){
313             $counter = Counter::model()->findByPk($_GET['f']);
314             if($counter){
315                 $counter->seen++;
316                 $counter->save();
317             }
318         }
319         
320         $crt = new CDbCriteria;
321         $crt -> limit = 4;

Stack Trace

#7
+
 /home/crocus/public_html/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 20:05:16 Apache Yii Framework/1.1.13