ErrorException: Invalid argument supplied for foreach()

Debugger::handle_error (2, "Invalid argument supplied for foreach()", "/home/u40154/roomline.ru/www/cache/blocks-header.php", 32, array(6))

32/home/u40154/roomline.ru/www/cache/blocks-header.php

30.     <h3>Компетенции</h3>
31.     <ul>
32.       <?php foreach (Category::getAllForHeader() as $data->loop_index => $data->cat) { ?>
33.         <li><a href="/catalog/<?php echo Template::sanitize ($data->cat -> url'UTF-8'); ?>"><?php echo Template::sanitize ($data->cat -> name'UTF-8'); ?></a></li>
34.       <?php ?>

require ("/home/u40154/roomline.ru/www/cache/blocks-header.php")

298/home/u40154/roomline.ru/www/lib/Template.php

296.         
297.         ob_start ();
298.         require ($cache);
299.         return ob_get_clean ();
300.     }

Template->render ("blocks/header", Page)

8/home/u40154/roomline.ru/www/cache/catalog_layout.php

6.   <div class="g-bg-sh"></div>
7.   <div class="b-content-wrapper">
8.     <?php echo $this->render ('blocks/header'$data); ?>
9.
10.     <div class="b-main-wrapper">

require ("/home/u40154/roomline.ru/www/cache/catalog_layout.php")

298/home/u40154/roomline.ru/www/lib/Template.php

296.         
297.         ob_start ();
298.         require ($cache);
299.         return ob_get_clean ();
300.     }

Template->render ("catalog_layout", Page)

146/home/u40154/roomline.ru/www/lib/Page.php

144.             return ($res) ? $res $out;
145.         }
146.         $out $tpl->render ($this->layout$this);
147.         $res $controller->hook ('page/render', array ('html' => $out));
148.         return ($res) ? $res $out;

Page->render (Template, Controller)

159/home/u40154/roomline.ru/www/index.php

157.    compression if conf[General][compress_outputis true.
158.    */
159.   $out $page->render($tpl$controller);
160.   if (extension_loaded('zlib') && conf('General''compress_output')) {
161.     $zlib_oc ini_get('zlib.output_compression');

Error Context

$template "blocks/header";

$data Page (
    
$head "&lt;meta name=&quot;keywords&quot; content=&quot;Beyerdynamic&quot; /&gt;
&lt;meta name=&quot;description&quot; content=&quot;Beyerdynamic&quot; /&gt;
"
;
    
$tail "";
    
$title "Каталог";
    
$_menu_title "Каталог";
    
$_window_title "Beyerdynamic";
    
$body "  &lt;div class=&quot;b-products&quot;&gt;

          &lt;div class=&quot;b-products__item pr&quot; data-type=&quot;tile&quot; data-id=&quot;1775&quot; data-groups=&quot;23&quot;&gt;
        
        &lt;div class=&quot;b-products__item__sh&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;b-products__item__desc&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1775&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic C-ONE Screw Set - Black&lt;/a&gt;&lt;span class=&quot;price&quot;&gt;199 &lt;ins&gt;a&lt;/ins&gt;&lt;/span&gt;

          &lt;div class=&quot;b-products__item__desc-more&quot;&gt;
            &lt;p&gt;Набор болтов для крепления декоративных колец, в комплекте 8 шт, 2,5х5, цвет - чёрный&lt;/p&gt;
                        &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1775&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                      &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class=&quot;b-products_list__item pr&quot; style=&quot;display:none&quot; data-type=&quot;list&quot; data-id=&quot;1775&quot; data-groups=&quot;23&quot;&gt;
        


        &lt;div class=&quot;b-products_list__item-actions flr&quot;&gt;
          &lt;div class=&quot;price&quot;&gt;199 &lt;ins&gt;a&lt;/ins&gt;&lt;/div&gt;
                    &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1775&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                &lt;/div&gt;

        &lt;div class=&quot;b-products_list__item-desc pr&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1775&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic C-ONE Screw Set - Black&lt;/a&gt;
          &lt;div class=&quot;art&quot;&gt;арт: &lt;/div&gt;
          &lt;p&gt;Набор болтов для крепления декоративных колец, в комплекте 8 шт, 2,5х5, цвет - чёрный&lt;/p&gt;
        &lt;/div&gt;

        &lt;div class=&quot;clfix&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
          &lt;div class=&quot;b-products__item pr&quot; data-type=&quot;tile&quot; data-id=&quot;1776&quot; data-groups=&quot;23&quot;&gt;
        
        &lt;div class=&quot;b-products__item__sh&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;b-products__item__desc&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1776&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic C-ONE Ring - Black&lt;/a&gt;&lt;span class=&quot;price&quot;&gt;280 &lt;ins&gt;a&lt;/ins&gt;&lt;/span&gt;

          &lt;div class=&quot;b-products__item__desc-more&quot;&gt;
            &lt;p&gt;декоративная накладка (кольцо) 2 шт, цвет черный&lt;/p&gt;
                        &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1776&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                      &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class=&quot;b-products_list__item pr&quot; style=&quot;display:none&quot; data-type=&quot;list&quot; data-id=&quot;1776&quot; data-groups=&quot;23&quot;&gt;
        


        &lt;div class=&quot;b-products_list__item-actions flr&quot;&gt;
          &lt;div class=&quot;price&quot;&gt;280 &lt;ins&gt;a&lt;/ins&gt;&lt;/div&gt;
                    &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1776&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                &lt;/div&gt;

        &lt;div class=&quot;b-products_list__item-desc pr&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1776&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic C-ONE Ring - Black&lt;/a&gt;
          &lt;div class=&quot;art&quot;&gt;арт: &lt;/div&gt;
          &lt;p&gt;декоративная накладка (кольцо) 2 шт, цвет черный&lt;/p&gt;
        &lt;/div&gt;

        &lt;div class=&quot;clfix&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
          &lt;div class=&quot;b-products__item pr&quot; data-type=&quot;tile&quot; data-id=&quot;1784&quot; data-groups=&quot;23&quot;&gt;
        
        &lt;div class=&quot;b-products__item__sh&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;b-products__item__desc&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1784&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic С-ONE Cv - Snake White&lt;/a&gt;&lt;span class=&quot;price&quot;&gt;450 &lt;ins&gt;a&lt;/ins&gt;&lt;/span&gt;

          &lt;div class=&quot;b-products__item__desc-more&quot;&gt;
            &lt;p&gt;декоративные накладки 2 шт, &amp;quot;змеиная кожа&amp;quot;, черно-белая&lt;/p&gt;
                        &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1784&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                      &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class=&quot;b-products_list__item pr&quot; style=&quot;display:none&quot; data-type=&quot;list&quot; data-id=&quot;1784&quot; data-groups=&quot;23&quot;&gt;
        


        &lt;div class=&quot;b-products_list__item-actions flr&quot;&gt;
          &lt;div class=&quot;price&quot;&gt;450 &lt;ins&gt;a&lt;/ins&gt;&lt;/div&gt;
                    &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1784&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                &lt;/div&gt;

        &lt;div class=&quot;b-products_list__item-desc pr&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1784&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic С-ONE Cv - Snake White&lt;/a&gt;
          &lt;div class=&quot;art&quot;&gt;арт: &lt;/div&gt;
          &lt;p&gt;декоративные накладки 2 шт, &amp;quot;змеиная кожа&amp;quot;, черно-белая&lt;/p&gt;
        &lt;/div&gt;

        &lt;div class=&quot;clfix&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
          &lt;div class=&quot;b-products__item pr&quot; data-type=&quot;tile&quot; data-id=&quot;1781&quot; data-groups=&quot;23&quot;&gt;
        
        &lt;div class=&quot;b-products__item__sh&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;b-products__item__desc&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1781&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic С-ONE Cv - Red Star&lt;/a&gt;&lt;span class=&quot;price&quot;&gt;450 &lt;ins&gt;a&lt;/ins&gt;&lt;/span&gt;

          &lt;div class=&quot;b-products__item__desc-more&quot;&gt;
            &lt;p&gt;декоративные накладки 2 шт, звезда&lt;/p&gt;
                        &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1781&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                      &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class=&quot;b-products_list__item pr&quot; style=&quot;display:none&quot; data-type=&quot;list&quot; data-id=&quot;1781&quot; data-groups=&quot;23&quot;&gt;
        


        &lt;div class=&quot;b-products_list__item-actions flr&quot;&gt;
          &lt;div class=&quot;price&quot;&gt;450 &lt;ins&gt;a&lt;/ins&gt;&lt;/div&gt;
                    &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;1781&quot;&gt;&lt;span&gt;В корзину&lt;/span&gt;&lt;/a&gt;
                &lt;/div&gt;

        &lt;div class=&quot;b-products_list__item-desc pr&quot;&gt;
          &lt;a href=&quot;/catalog/naushniki/1781&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(?holder.js/277x217)&quot;&gt;&lt;/i&gt;Наушники Beyerdynamic С-ONE Cv - Red Star&lt;/a&gt;
          &lt;div class=&quot;art&quot;&gt;арт: &lt;/div&gt;
          &lt;p&gt;декоративные накладки 2 шт, звезда&lt;/p&gt;
        &lt;/div&gt;

        &lt;div class=&quot;clfix&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
    
    &lt;div class=&quot;clfix&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;

      &lt;div class=&quot;g-show-more tac&quot;&gt;
      &lt;a class=&quot;g-button g-button_big js-show-more&quot; data-type=&quot;catalog&quot; href=&quot;&quot; data-product_key=&quot;brand&quot; data-key_id=&quot;20&quot;&gt;&lt;span&gt;Показать еще&lt;/span&gt;&lt;/a&gt;
    &lt;/div&gt;
  "
;
    
$layout "catalog_layout";
    
$scripts = array (
        
"&lt;script src=&quot;/js/jquery-1.8.3.min.js&quot;&gt;&lt;/script&gt;
"
        "&lt;script src=&quot;/js/jquery.cookie.js&quot;&gt;&lt;/script&gt;
"
        "&lt;script src=&quot;/js/jquery.verify_values.js&quot;&gt;&lt;/script&gt;
"
        "&lt;script src=&quot;/js/holder.js&quot;&gt;&lt;/script&gt;
"
    
);
    
$is_being_rendered true;
    
$preview false;
    
$id "catalog";
    
$breadcrumbs = array (
        
stdClass (
            
$url "/";
            
$name "Главная";
)
        
stdClass (
            
$name "Каталог";
            
$url "/catalog";
)
        
stdClass (
            
$name "Beyerdynamic";
            
$url "/catalog/beyerdynamic";
)
    );
    
$key_id 20;
    
$product_key "brand";
    
$price_min 199;
    
$price_max 69990;
);

$app "blocks";

$view "header";

$file "layouts/blocks/header.html";

$cache "cache/blocks-header.php";