PHP warning

Invalid argument supplied for foreach()

/home/kingwaterp/domains/kingwaterpure.com/public_html/themes/web/views/product/show_item_product.php(94)

082                                     lensHeight: 200
083                                 });
084 }
085                             });
086                         </script>
087 
088 
089 
090                     </div>
091                     <div class="row">
092                         <?php 
093                       $i=0;
094                         foreach($img_arr as $val){
095                         ?>
096                         <div class="col-md-2">
097                             <a href="#!">
098                                     <img class="img_arr" onclick="$.edit_zoom(<?php echo $i; ?>)" style="padding:10px;border: 1px solid #E1F5FE;" width="80" height="80" src="<?php echo  $val ?>" alt=""  />
099                             </a>
100                            
101                         </div>
102                         <?php 
103                         $i++;
104                         }
105                             ?>
106                     </div>

Stack Trace

#4
+
 /home/kingwaterp/domains/kingwaterpure.com/public_html/protected/controllers/frontend/ProductController.php(398): CController->render("product/show_item_product", array("pro_id" => "113"))
393 
394         $product = Product::model()->findByPk($_GET['pro_id']);
395         $this->pageDescription = $product->pro_detail;
396         $this->render('product/show_item_product', array(
397             'pro_id' => $_GET['pro_id']
398         ));
399     }
400 
401     public function actionList_product_index() {
402         $this->layout = 'Product';
403         if ($_POST['type_product'] == '0') {
#12
+
 /home/kingwaterp/domains/kingwaterpure.com/public_html/protected/components/WebApplicationEndBehavior.php(25): CApplication->run()
20         // Attach the changeModulePaths event handler
21         // and raise it.
22         $this->onModuleCreate = array($this, 'changeModulePaths');
23         $this->onModuleCreate(new CEvent($this->owner));
24  
25         $this->owner->run(); // Run application.
26     }
27  
28     // This event should be raised when CWebApplication
29     // or CWebModule instances are being initialized.
30     public function onModuleCreate($event)
#15
+
 /home/kingwaterp/domains/kingwaterpure.com/public_html/index.php(10): CComponent->__call("runEnd", array("frontend"))
05 // Remove the following lines when in production mode
06 defined('YII_DEBUG') or define('YII_DEBUG', true);
07 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
08  
09 require_once($yii);
10 Yii::createWebApplication($config)->runEnd('frontend');
2024-03-28 19:40:51 Apache/2 Yii Framework/1.1.14