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;Bowers &amp;amp; Wilkins&quot; /&gt;
&lt;meta name=&quot;description&quot; content=&quot;Bowers &amp;amp; Wilkins&quot; /&gt;
"
;
    
$tail "";
    
$title "Каталог";
    
$_menu_title "Каталог";
    
$_window_title "Bowers &amp; Wilkins";
    
$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;591&quot; data-groups=&quot;1&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/akusticheskie-sistemy/591&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(/cache/thumbus/277_305/31bfa0e7bba8744435e07494d65f10be.jpg)&quot;&gt;&lt;/i&gt;Акустическая система Bowers &amp;amp; Wilkins PM1&lt;/a&gt;&lt;span class=&quot;price&quot;&gt;275 000 &lt;ins&gt;a&lt;/ins&gt;&lt;/span&gt;

          &lt;div class=&quot;b-products__item__desc-more&quot;&gt;
            &lt;p&gt;&lt;/p&gt;
                        &lt;a class=&quot;g-button js-add2cart&quot; href=&quot;&quot; data-id=&quot;591&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;591&quot; data-groups=&quot;1&quot;&gt;
        


        &lt;div class=&quot;b-products_list__item-actions flr&quot;&gt;
          &lt;div class=&quot;price&quot;&gt;275 000 &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;591&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/akusticheskie-sistemy/591&quot;&gt;&lt;i class=&quot;holderjs&quot; style=&quot;background-image:url(/cache/thumbus/277_305/31bfa0e7bba8744435e07494d65f10be.jpg)&quot;&gt;&lt;/i&gt;Акустическая система Bowers &amp;amp; Wilkins PM1&lt;/a&gt;
          &lt;div class=&quot;art&quot;&gt;арт: &lt;/div&gt;
          &lt;p&gt;&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;

  "
;
    
$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 "Bowers &amp; Wilkins";
            
$url "/catalog/bowers-wilkins";
)
    );
    
$key_id 9;
    
$product_key "brand";
    
$price_min 275000;
    
$price_max 275000;
);

$app "blocks";

$view "header";

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

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