PHP Error

Trying to get property of non-object

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

352         session_start();
353         $model = Product::model()->findByPk($id);
354 
355         //=========SEO=========
356         if (!empty($model->seo_title) && !empty($model->seo_desc) && !empty($model->seo_keyword)) {
357             $this->pageTitle = $model->seo_title;
358             $this->description = $model->seo_desc;
359             $this->keyword = $model->seo_keyword;
360         }
361         else
362         {
363             $arr_seo = array(
364                 'title' => $model->name,
365                 'description' => ($model->name . ' - ' . myExt::getBrief($model->brief)),
366                 'keyword' => $model->name
367                 );
368             Seo::getSeo(Seo::PRODUCT_PAGE, $arr_seo);
369         }
370         $this->og_title = $model->name;
371         $this->og_description = myExt::getBrief($model->brief);
372         $this->og_type = 'article';
373         if (!empty($model->imgs)) {
374             $this->og_image = str_replace('thumb/', '', $model->imgs[0]->path);
375         }
376         //=========SEO=========

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:11:29 Apache/2 Yii Framework/1.1.7