TypeError

count(): Argument #1 ($value) must be of type Countable|array, null given

/home/magnustech/domains/magnus-tech.pl/public_html/protected/myWidgets/MenuWidget.php(16)

04 
05     public $menu = array();
06     public $menuId;
07     
08     public function init() {
09         // jest to metoda wołana przez CController::beginWidget()
10         // print_r($this->menu);
11         echo '<ul id="'.$this->menuId.'">
12             ';
13         if (count($this->menu) > 0)
14             foreach ($this->menu as $key => $value) {
15                 echo '<li><a href="' . $value['url'] . '" ' . ($value['active'] == true ? 'class="active"' : '') . ' >' . $value['title'] . '</a>';
16                 if (count($value['subpage']) > 0) {
17                     echo $this->showSubmenu($value['subpage']);
18                 }
19                 echo '</li>
20                 ';
21             }
22 
23         echo '</ul>
24             ';
25     }
26 
27     private function showSubmenu($array = array()) {
28         $out = '<ul>

Stack Trace

#2
+
 /home/magnustech/domains/magnus-tech.pl/public_html/themes/classic/views/layouts/main.php(50): CBaseController->widget("application.myWidgets.MenuWidget", array("menu" => array(array("alias" => "/", "title" => "Start", "url" => "/", "active" => false, ...), array("alias" => "firma", "title" => "Firma", "url" => "firma", "active" => true, ...), array("alias" => "produkty", "title" => "Produkty", "url" => "produkty", "active" => false, ...), array("alias" => "centrum-wiedzy", "title" => "Centrum wiedzy", "url" => "centrum-wiedzy", "active" => false, ...), ...), "menuId" => "mainMenu"))
45                     <a class="menuBtn"></a>
46                     <?php
47                     $this->widget('application.myWidgets.MenuWidget'
48                             , array(
49                         'menu' => $this->menu,
50                         'menuId' => 'mainMenu'
51                             )
52                     );
53                     ?>
54                     <div id="searchHolder">
55                         <a id="searchTrigger"></a>
#10
+
 /home/magnustech/domains/magnus-tech.pl/public_html/themes/classic/views/layouts/column2.php(36): CBaseController->endContent()
31         <?php echo $content; ?>
32         <div class="clear"></div>
33     </div>
34 </div>
35 <div class="clear"></div>
36 <?php $this->endContent(); ?>
#14
+
 /home/magnustech/domains/magnus-tech.pl/public_html/protected/controllers/SiteController.php(554): CController->render("pageText")
549      * strony tekstowe
550      */
551     public function actionTypeText() {
552 
553 
554         $this->render('pageText');
555     }
556 
557     /**
558      * lista stron tekstowych
559      */
2024-03-19 08:06:04 LiteSpeed Yii Framework/1.1.12