PHP warning

count(): Parameter must be an array or an object that implements Countable

/home/raovobjd/muahangmy.com/protected/components/widgets/views/widgetRelatedProduct.php(1)

01 <?php if (count($model) > 6) {
02     ?>
03     <style>
04         .owl-carousel .owl-item img {
05             max-height: 115px;
06             max-width: 100%;
07             width: auto;
08         !important;
09             text-align: center;
10             display: block;
11             margin: auto;
12         }
13     </style>

Stack Trace

#3
+
 /home/raovobjd/muahangmy.com/protected/components/widgets/WidgetRelatedProduct.php(30): CWidget->render("widgetRelatedProduct", array("model" => null))
25         }
26 
27     }
28 
29     public function run() {
30         return CWidget::render('widgetRelatedProduct', array('model' => $this->results));
31     }
32 }
#5
+
 /home/raovobjd/muahangmy.com/protected/views/front/expressProduct/detail.php(105): CBaseController->widget("WidgetRelatedProduct")
100 
101         </div>
102     </div>
103 </div>
104 
105 <?php $this->widget("WidgetRelatedProduct"); ?>
106 <?php $this->widget("WidgetProductViewed"); ?>
107 
108 <script type="text/javascript" src="<?php echo HSUrl::home() ?>/js/jquery.min.js"></script>
109 
110 <script type="text/javascript" src="<?php echo HSUrl::home() ?>/js/hs.core.js"></script>
#10
+
 /home/raovobjd/muahangmy.com/protected/controllers/front/ExpressProductController.php(23): CController->render("detail", array("model" => ExpressProduct, "images" => array(ExpressProductImage)))
18         //canonical & title link
19         $this->pageTitle = $product->title . ' , ' . Yii::app()->params['meta_title'];
20         Yii::app()->clientScript->registerLinkTag('canonical', null, HSCommon::getCurrentUrl());
21         //endregion
22 
23         $this->render('detail', array('model' => $product, 'images' => ExpressProductImage::model()->findAllByAttributes(array('product_id' => $product->id))));
24     }
25 
26     public function actionIndex() {
27         $this->layout = 'shop_page';
28         $criteria = new CDbCriteria();
2024-03-28 16:21:41 LiteSpeed Yii Framework/1.1.14