PHP warning

Invalid argument supplied for foreach()

/home/httpd/vhosts/mnppetroleum.com/httpdocs/protected/views/layouts/partials/leftmenu.php(51)

39                     }
40                     /*print_r($items);*/
41                 }
42             }
43         }
44         //if(isset($parent)){
45             //echo "PARENT";
46         ?>
47         <div class="operationleftTitle">
48             <a href="<?= $parent["url"]; ?>"><?= $parent["label"]; ?></a>
49         </div>
50         <?php
51         foreach($items as $itm){
52         ?>
53             <div class="operationleftRow <?php if($itm["id"]==$this->cNav->page->structure_id){ ?>operationActive<?php }else{ ?>transBtn2<?php } ?>">
54                 <a href="<?= $itm["url"] ?>">
55                     <?= $itm["label"] ?>
56                 </a>
57             </div>
58         <?php
59             //$subitems = Structure::model()->findAll('parent_id = :pid', array(':pid' => $itm["id"]));
60             $subitems = Structure::getMenuItems($itm["id"], Yii::app()->language, false, 1, 1);
61             $ids = array();
62             foreach($subitems as $subitm){
63                 $ids[] = $subitm["id"];

Stack Trace

#3
+
 /home/httpd/vhosts/mnppetroleum.com/httpdocs/protected/views/layouts/col-none.php(14): CController->renderPartial("application.views.layouts.partials.leftmenu", array("this" => IndexController))
09     }
10   ?>
11   <!--<h2 class="subTitle"><?php echo $this->cPage["cms_h2"]; ?></h2>-->
12   <?php endif; ?>
13   <div class="view-content">
14     <?php $this->renderPartial('application.views.layouts.partials.leftmenu', array('this' => $this)); ?>
15     <div class="operationright">
16         <div class="operationImg">
17             <img src="<?= $sidePic; ?>" alt=""/>
18         </div>
19         <?php if (!empty($this->h1)) : ?>
#7
+
 /home/httpd/vhosts/mnppetroleum.com/httpdocs/protected/modules/website/controllers/IndexController.php(137): CController->render("team", array("team" => Team))
132     $team = Team::model()->findByPk((int) $_GET['id']);
133     if (empty($team))
134         $this->redirect('/');
135         
136     $this->render('team', array(
137         'team' => $team
138     ));
139   }
140 }
#15
+
 /home/httpd/vhosts/mnppetroleum.com/httpdocs/index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG',true);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
2024-04-28 13:42:43 Apache Yii Framework/1.1.13