PHP notice

Trying to get property 'name' of non-object

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

101         $this->render("news",array(
102             "news"=>$news,
103             'item_count'=>$countItem,
104             'page_size'=>7,
105             'pages'=>$pages,
106         ));
107     }
108     //Tin tuc chi tiet
109     public function actionNewsDetail($id=null,$alias=null){
110         $cri = new CDBCriteria;
111         $cri->addCondition("id = {$id}");
112         $news = News::model()->find($cri);
113         $title = $news->name;
114         $this->noidung = $news->description;
115         $this->ten = $title;
116         $this->hinhanh = $news->image;
117         if($news == null)
118             throw new CHttpException('404','Trang bạn yêu cầu không tìm thấy.');
119                 
120         if(!empty($this->arrSystem))
121             $this->pageTitle = $news->name.' - '.$this->arrSystem->title;
122         $cri = new CDBCriteria;        
123         $cri->addCondition("alias NOT LIKE :alias");
124         $cri->params = array(':alias'=>$alias);
125         $other_news = News::model()->findAll($cri);

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-29 17:00:28 Apache/2 Yii Framework/1.1.14