Error

Call to a member function getOrtherProduct() on null

/home/tienphatglass/public_html/protected/views/site/pages/product.php(181)

169                             <div class="desc_product cbox_ppage"><?php echo $model->description; ?></div>
170                             <div class="feature_product cbox_ppage"><?php echo $model->feature; ?></div>
171                         </div>
172                         <!--end detail_product-->
173                         
174                     </div>
175                     <!--end product_page-->
176                     
177                     <div class="fb-comments" data-href="<?php echo $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" data-width="100%" data-numposts="5"></div>
178 
179 
180                     <?php
181                     $orther = $model->getOrtherProduct();
182                     if (!empty($orther)) {
183                         ?>
184                             <div class="sp-lienquan">
185                                 <p class="title_box">Sản phẩm liên quan</p>
186                                 <div class="row listproduct">
187                                     <?php
188                                     foreach ($orther as $row) {
189                                         $img = $row->getDefaultImage();
190                                         $img_path = (!empty($img))?$img->path:'css/images/noimage.jpg';
191                                         ?>
192                                         <div class="col-xs-3 item">
193                                             <dl>

Stack Trace

#4
+
 /home/tienphatglass/public_html/protected/controllers/SiteController.php(473): CController->render("pages/product", array("model" => null))
468             $this->og_image = str_replace('thumb/', '', $model->imgs[0]->path);
469         }
470         //=========SEO=========
471 
472         Product::model()->updateByPk($model->id, array('hits' => (($model->hits==0)?1:($model->hits+1))));
473         $this->render('pages/product', array('model' => $model));
474     }
475     
476     /*
477     * LIỆT KÊ SẢN PHẨM THEO DANH MỤC
478     */
#14
+
 /home/tienphatglass/public_html/index.php(18): CApplication->run()
13 defined('YII_DEBUG') or define('YII_DEBUG',true);
14 // specify how many levels of call stack should be shown in each log message
15 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
2024-03-29 12:29:21 LiteSpeed Yii Framework/1.1.17