PHP Error

Trying to get property of non-object

/home/trungdq/domains/trungdiep.com/public_html/protected/controllers/SiteController.php(389)

377 
378         $this->render('pages/view', array('model' => $model));
379     }
380     
381     /*
382     * LIỆT KÊ SẢN PHẨM THEO DANH MỤC
383     */
384     public function actionListProduct($id, $name)
385     {
386         $arr_type = array();
387         $conf = Configure::getConfigure();
388         $cat = Cat::model()->findByPk($id);
389         $this->cat_id = $cat->id;
390         $arr_type[] = $cat->id;
391 
392         //navigation_bar
393         $this->navigation_bar = $this->navigation_bar . '<i class="fa fa-angle-double-right"></i>' . CHtml::link($cat->name, Yii::app()->urlManager->createUrl('site/ListProduct', array('id' => $cat->id, 'name' => $cat->url)));
394         //navigation_bar
395 
396         $type = Type::getAllTypeByCat($cat->id);
397         foreach ($type as $row) {
398             $arr_type[] = $row->id;
399         }
400 
401         $criteria = new CDbCriteria();

Stack Trace

#9
+
 /home/trungdq/domains/trungdiep.com/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-19 17:11:09 Apache/2 Yii Framework/1.1.7