PHP notice

Trying to get property of non-object

/home/h/huysmotor2/lavavto/public_html/protected/views/product/view.php(32)

20         $this->renderPartial('_img', array('gallery'=>$gallery,'model'=>$model));
21     }?>
22 </div>
23 
24 <div class="col-sm-7">
25     <?php if(!empty($model->price)){?>
26     <p class="price product_price"><span class="dram"> դր.</span><?php echo $model->price;?></p>
27     <?php } ?>
28     <div class="product_type"><?php echo Yii::t('multi', 'Category')?>: <?php echo CHtml::link($model->category->title, array('/'.Yii::app()->language.'/category/'.$model->cid), array('title'=>$model->category->title))?></div>
29     <div class="product_type"><?php echo Yii::t('multi', 'Article')?>:<?php echo $model->article;?></div>
30 
31     <div class="product_type"><?php echo Yii::t('multi', 'Code')?>:<?php echo $model->code;?></div>
32     <div class="product_type"><?php echo Yii::t('multi', 'Supplier')?>:<?php echo $model->partner->title;?></div>
33 
34     <hr/>
35     <h3><?php echo Yii::t('multi', 'Description')?>:</h3>
36     <p class="description">
37         <?php echo $model->desc;?>
38     </p>
39 </div>
40 
41 <div class="" style="margin-top:10px;">
42 
43 <div class="pull-right">
44     

Stack Trace

#4
+
 /home/h/huysmotor2/lavavto/public_html/protected/controllers/ProductController.php(26): CController->render("view", array("model" => Product, "gallery" => array()))
21         $criteria->order='position DESC';
22 
23         $gallery = Gallery::model()->findAll($criteria);
24         
25         
26         $this->render('view', array('model'=>$model, 'gallery'=>$gallery));
27         
28         
29     }
30 
31 
#12
+
 /home/h/huysmotor2/lavavto/public_html/common/components/WebApplication.php(33): CWebApplication->runController("product/view")
28      * that Apache polls its processes to see if they're alive. This function causes
29      * Yii to respond without logging errors.
30      */
31     public function runController($route) {
32         try {
33             parent::runController($route);
34         } catch (CHttpException $e) {
35             if (@$_SERVER['REQUEST_METHOD'] == 'OPTIONS' && @$_SERVER['REQUEST_URI'] == '*') {
36                 Yii::app()->end('Hello, friend!');
37             } else
38                 throw $e;
#15
+
 /home/h/huysmotor2/lavavto/public_html/index.php(44): CApplication->run()
39 EZendAutoloader::$basePath = Yii::getPathOfAlias('common.lib') . DIRECTORY_SEPARATOR;
40 
41 Yii::registerAutoloader(array("EZendAutoloader", "loadClass"), true);
42 */
43 
44 $app->run();
45 
46 /* uncomment if you wish to debug your resulting config */
47 /* echo '<pre>' . dump($config) . '</pre>'; */
2024-03-28 13:32:37 Apache/2.2.29 (Gentoo) PHP/7.1.33 Yii Framework/1.1.12