PHP notice

Trying to get property of non-object

/opt/data2/wimuch_com_website/protected/controllers/HomeController.php(116)

104         ));
105     }
106     
107     public function actionPlist(){
108         $this->title='产品中心';
109         $this->isHome = 'product';
110         $current = $this->pa('page', 1);
111         $cid = (int)$this->pa('cid',0); 
112         $cat = WiProductCategory::model()->findByPk($cid);
113         $default1 = 0;
114         $default2 = 0;
115         if($cid){
116             if($cat->parent_id==0){
117                 $default1 = $cat->id;
118             }else{
119                 $default1 = $cat->parent_id;
120                 $default2 = $cat->id;
121             }
122         }
123         
124         
125         
126         $cdbcr =new CDbCriteria();
127         if($cid){
128             if($cat->parent_id==0){

Stack Trace

#7
+
 /opt/data2/wimuch_com_website/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-19 14:09:28 nginx/1.10.3 Yii Framework/1.1.19