PHP Error

Trying to get property of non-object

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

705         ));
706     }
707 
708     /*
709     * LIỆT KÊ SẢN PHẨM THEO THƯƠNG HIỆU & CHỦNG LOẠI
710     */
711     public function actionListProductByTypeBrand($type_id, $brand_id, $type_name, $brand_name)
712     {
713         $arr_type = array();
714         $conf = Configure::getConfigure();
715         $type = Type::model()->findByPk($type_id);
716         $brand = Brand::model()->findByPk($brand_id);
717         $arr_type[] = $type->id;
718         $this->cat_id = $type->cat_id;
719 
720         //navigation_bar
721         if (!empty($type->cat)) {
722             $cat = $type->cat;
723             $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)));
724         }
725         $this->navigation_bar = $this->navigation_bar . '<i class="fa fa-angle-double-right"></i>' . CHtml::link($brand->name, Yii::app()->urlManager->createUrl('site/ListProductByBrand', array('id' => $brand->id, 'name' => $brand->url)));
726         if (!empty($type->type)) {
727             $pare = $type->type;
728             $this->navigation_bar = $this->navigation_bar . '<i class="fa fa-angle-double-right"></i>' . CHtml::link($pare->name, Yii::app()->urlManager->createUrl('site/ListProductByType', array('id' => $pare->id, 'name' => $pare->url)));
729         }

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 10:52:15 Apache/2 Yii Framework/1.1.7