PHP Error

Trying to get property of non-object

/home/trungdq/domains/trungdiep.com/public_html/protected/views/site/pages/product.php(10)

01 <?php $cont = Contact::getContact(); ?>
02 <div class="subpage">
03     <div class="module">
04 
05         <p class="nav_bar"><a href="<?php echo Yii::app()->homeUrl; ?>"><i class="fa fa-home"></i> Trang chủ</a><?php echo $this->navigation_bar; ?></p>
06     
07         <!--begin left-->
08         <div class="left">
09 
10             <p class="title_p"><?=$model->type->name; ?></p>
11 
12             <!--begin product_page-->
13             <div class="product_page animBlock">
14 
15                 <!--begin brief_product-->
16                 <div class="brief_ppage">
17                     <div class="left_box">
18                         <!--begin left_product-->
19                         <div class="left_ppage">
20                             <p><a href="<?php echo str_replace('thumb/', '', $model->imgs[0]->path); ?>" rel="example_group">
21                                 <?php
22                                 if (!empty($model->imgs)) 

Stack Trace

#4
+
 /home/trungdq/domains/trungdiep.com/public_html/protected/controllers/SiteController.php(346): CController->render("pages/product", array("model" => Product))
341             $this->og_image = str_replace('thumb/', '', $model->imgs[0]->path);
342         }
343         //=========SEO=========
344 
345         Product::model()->updateByPk($model->id, array('hits' => (($model->hits==0)?1:($model->hits+1))));
346         $this->render('pages/product', array('model' => $model));
347     }
348 
349     public function actionView($id)
350     {
351         $this->layout='//layouts/view';
#14
+
 /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-28 21:41:22 Apache/2 Yii Framework/1.1.7