PHP warning

Invalid argument supplied for foreach()

/home/suryasukses/public_html/protected/views/home/market_landing.php(47)

35       <div class="col-md-45 rights_cont_def">
36         <h6>Markets</h6>
37         <div class="clear clearfix"></div>
38         <div class="py-1"></div>
39         <div class="clear clearfix"></div>
40         <h3><?php echo ucwords($n_model['name_category']) ?></h3>
41         <div class="row feature-data mb-0 mt-0">
42           <div class="col-md-60">
43             
44             <div class="featured_car_detail">
45                 <div id="carouselEx_gallery" class="carousel slide" data-ride="carousel">
46                   <ol class="carousel-indicators d-none">
47                     <?php foreach ($n_model['picture'] as $key => $value): ?>
48                     <li data-target="#carouselEx_gallery" data-slide-to="<?php echo $key ?>" <?php if ($key == 0): ?>class="active"<?php endif ?>></li>
49                     <?php endforeach ?>
50                   </ol>
51                   <div class="carousel-inner">
52                     <?php foreach ($n_model['picture'] as $key => $value): ?>
53                     <div class="carousel-item <?php if ($key == 0): ?>active<?php endif ?>">
54                        <img class="img img-fluid w-100" src="<?php echo $this->assetBaseurl.'../../images/markets/'; ?><?php echo $value ?>" alt="<?php echo $_GET['slug'] ?>">
55                     </div>
56                     <?php endforeach; ?>
57                   </div>
58                 </div>
59             </div>

Stack Trace

#4
+
 /home/suryasukses/public_html/protected/controllers/HomeController.php(940): CController->render("market_landing", array("market_resource" => array(array("name_category" => "Beverage", "picture" => array("ill-beverage.jpg"), "desc" => "", "lists" => array(array("names" => "Water", "picture" => array("water.jpg"), "info" => "<p>A cornerstone of the beverage market, we’ll work with you t..."), array("names" => "Carbonates & Juices", "picture" => array("carbonated.jpg"), "info" => "<p>Our design and manufacturing expertise allows us to constantl..."), array("names" => "Coffee & Tea", "picture" => array("CCJ_0068.jpg"), "info" => "<p>We have a variety of packaging capabilities in RTD tea and co..."))), array("name_category" => "Healthcare", "picture" => array("ill-healthcare.jpg"), "desc" => "", "lists" => array(array("names" => "Pharmaceutical", "picture" => array("pharmaceutical.jpg"), "info" => "<p>We are proud to be a global leader in packaging. Our pharmace..."), array("names" => "Surgical Needs", "picture" => array("surgical.jpg"), "info" => "<p>AMARI Nonwoven (PP Spunbond & Meltblown) has a vital role in ..."), array("names" => "Disinfecting Wipes", "picture" => array("disinfecting-wipes.jpg"), "info" => "<p>The increasing rate of hospital acquired infections is a worr..."))), array("name_category" => "Household", "picture" => array("ill-households.jpg"), "desc" => "", "lists" => array(array("names" => "Laundry", "picture" => array("laundry.jpg"), "info" => ""), array("names" => "Cleaning Products", "picture" => array("cleaning-products.jpg"), "info" => ""), array("names" => "Gardening", "picture" => array("gardening.jpg"), "info" => ""))), array("name_category" => "Agriculture", "picture" => array("ill-agriculture.jpg"), "desc" => "", "lists" => array(array("names" => "Greenhouse Film", "picture" => array("greenhouse.jpg"), "info" => "<p>AMARI Nonwoven is used effectively to optimize the productivi..."), array("names" => "Mulch Film", "picture" => array("munch-film.jpg"), "info" => "<p>Agriculture technology are now vast and way more advanced as ..."), array("names" => "Fruit Protection", "picture" => array("fruit-protect.jpg"), "info" => "<p>AMARI nonwoven can be used to Protect fruit without using agr..."))), ...), "n_model" => null))
935 
936         $n_model = $data[$s_id];
937 
938         $this->render('market_landing', array(
939             'market_resource'=>$data,
940             'n_model'=>$n_model,
941         ));
942     }
943 
944     public function actionListInquiry()
945     {
#12
+
 /home/suryasukses/public_html/index.php(36): CApplication->run()
31 // specify how many levels of call stack should be shown in each log message
32 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
33 error_reporting(E_ALL ^ E_NOTICE);
34 date_default_timezone_set('Asia/Jakarta');
35 require_once($yii);
36 Yii::createWebApplication($config)->run();
37 
38 $end_timeeeee = microtime(TRUE);
39 
40 // echo $end_timeeeee - $start_timeeeee;
41 // echo "<br>";
2021-01-26 18:49:00 Apache Yii Framework/1.1.12