PHP notice

Trying to get property 'name' of non-object

/home/danangtra/domains/danangtravelmart.com.vn/public_html/protected/controllers/HomeController.php(339)

327             throw new CHttpException('404','Trang bạn yêu cầu không tìm thấy.');
328         $this->render("tourFeatured", array(
329             "arrPro" => $arrPro,
330             'item_count'=>$countItem,
331             'page_size'=>8,
332             'pages'=>$pages,            
333         ));
334     }
335     public function actionTourCulaocham($id=null,$alias = null){
336         $cri = new CDBCriteria;        
337         $cri->addCondition("id = {$id}");
338         $culaocham = ToursCulaocham::model()->find($cri);
339         $this->ten = $culaocham->name;        
340         $this->noidung = $culaocham->description;
341         $this->hinhanh = $culaocham->image;
342         if($culaocham == null)
343             throw new CHttpException('404','Trang bạn yêu cầu không tìm thấy.');
344         $criteria = new CDbCriteria;
345             $criteria->addCondition("tour_id = ".$id);
346             $images = HotelImages::model()->findAll($criteria);    
347         if(!empty($this->arrSystem))
348             $this->pageTitle = $culaocham->name.' - '.$this->arrSystem->title;
349         
350         $this->render("tourCulaocham",array("culaocham"=>$culaocham,"images"=>$images));
351     }

Stack Trace

#9
+
 /home/danangtra/domains/danangtravelmart.com.vn/public_html/index.php(12): CApplication->run()
07 defined('YII_DEBUG') or define('YII_DEBUG',true);
08 // specify how many levels of call stack should be shown in each log message
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
10 
11 require_once($yii);
12 Yii::createWebApplication($config)->run();
13 
2024-03-19 13:52:27 Apache/2 Yii Framework/1.1.14