ErrorException: Invalid argument supplied for foreach()

Debugger::handle_error (2, "Invalid argument supplied for foreach()", "/var/www/townofblackcreek.org/apps/fbstatus/handlers/bullet.php", 21, array(14))

21/var/www/townofblackcreek.org/apps/fbstatus/handlers/bullet.php

19. $status = array();
20.
21. foreach($raw_status -> data as $r) {
22.     if($index >= intval($data["display"])) {
23.         break;

require ("/var/www/townofblackcreek.org/apps/fbstatus/handlers/bullet.php")

444/var/www/townofblackcreek.org/lib/Controller.php

442.         // Run the handler and get its output
443.         ob_start ();
444.         $res = require ($handler);
445.         $out ob_get_clean ();
446.         if (is_string ($res) && strlen ($res) > 0) {

Controller->handle ("apps/fbstatus/handlers/bullet.php", true, array(6))

335/var/www/townofblackcreek.org/lib/Controller.php

333.         }
334.
335.         return $c->handle ($handler$internal$data);
336.     }
337.

Controller->run ("fbstatus/bullet", array(6))

533/var/www/townofblackcreek.org/lib/Template.php

531.                     $data = array ();
532.                 }
533.                 $out .= $this->controller->run ($url['host'] . $url['path'], $data);
534.             } else {
535.                 $out .= $part;

Template->run_includes ("

")

86/var/www/townofblackcreek.org/apps/blocks/handlers/index.php

84. }
85.
86. echo $tpl->run_includes ($b->body);
87.
88. ?>

require ("/var/www/townofblackcreek.org/apps/blocks/handlers/index.php")

444/var/www/townofblackcreek.org/lib/Controller.php

442.         // Run the handler and get its output
443.         ob_start ();
444.         $res = require ($handler);
445.         $out ob_get_clean ();
446.         if (is_string ($res) && strlen ($res) > 0) {

Controller->handle ("apps/blocks/handlers/index.php", true, array(0))

335/var/www/townofblackcreek.org/lib/Controller.php

333.         }
334.
335.         return $c->handle ($handler$internal$data);
336.     }
337.

Controller->run ("blocks/updates", array(0))

41/var/www/townofblackcreek.org/cache/blackcreek-desktop.php

39.         </div>
40.         <div id="homeright">
41.         <?php echo $this->controller->run ('blocks/updates', array ()); ?>    
42.         </div>
43.         </div>

require ("/var/www/townofblackcreek.org/cache/blackcreek-desktop.php")

298/var/www/townofblackcreek.org/lib/Template.php

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

Template->render ("blackcreek/desktop", Page)

4/var/www/townofblackcreek.org/cache/blackcreek.php

2. <?php echo $this->render ('blackcreek/mobile'$data); ?>
3. <?php } else { ?>
4. <?php echo $this->render ('blackcreek/desktop'$data); ?>
5. <?php ?>

require ("/var/www/townofblackcreek.org/cache/blackcreek.php")

298/var/www/townofblackcreek.org/lib/Template.php

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

Template->render ("blackcreek", Page)

146/var/www/townofblackcreek.org/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)

158/var/www/townofblackcreek.org/index.php

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

Error Context

$handler "apps/fbstatus/handlers/bullet.php";

$internal true;

$data = array (
    
"username" => "blackcreektown"
    "date" 
=> "true"
    "display" 
=> 3
    
"truncate" => 60
    
"debug" => "false"
    "caching" 
=> 1800
);

$page Page (
    
$head "&lt;meta name=&quot;description&quot; content=&quot;&quot; /&gt;
&lt;meta name=&quot;keywords&quot; content=&quot;&quot; /&gt;
"
;
    
$tail "";
    
$title "Welcome";
    
$_menu_title "Welcome";
    
$_window_title "Welcome";
    
$body "&lt;p&gt;
As the Mayor of Black Creek and on behalf of the citizens, elected officials, and staff I would like to take the opportunity to welcome you to our web site and hope you will take the time to visit our town. Our vision for the town is to be a community families would like to come and make their home here and be a part of our community efforts.&lt;/p&gt;&lt;p&gt;
    &lt;strong&gt;&lt;em&gt;~ Ronald Godwin, Mayor
    &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;"
;
    
$layout "blackcreek";
    
$scripts = array (
        
"&lt;script src=&quot;/js/jquery-1.8.3.min.js&quot;&gt;&lt;/script&gt;
"
        "&lt;script src=&quot;/apps/slides/js/interact.js&quot;&gt;&lt;/script&gt;
"
        "&lt;script src=&quot;/apps/slides/js/slides.js&quot;&gt;&lt;/script&gt;
"
        "&lt;link rel=&quot;stylesheet&quot; href=&quot;/apps/slides/css/slides.css&quot; /&gt;
"
        "&lt;link rel=&quot;stylesheet&quot; href=&quot;/apps/fbstatus/css/bullet.css&quot; /&gt;
"
    
);
    
$is_being_rendered true;
    
$preview false;
    
$id "index";
    
$description "";
    
$keywords "";
);

$tpl Template (
    
$charset "UTF-8";
    
$cache_folder "cache";
    
$layouts_folder "layouts";
    
$view_folders "apps/%s/views/%s";
    
$default_layout "default";
    
$file_extension "html";
    
$controller Controller (
        
$params = array ();
        
$internal false;
        
$data = array ();
        
$cli false;
        
$put_data = ;
        
$app "admin";
        
$uri "admin/page";
        
$chunked false;
        
$cache false;
        
$status_code false;
);
);

$cache Cache (
    
$dir "cache/datastore";
);

$i18n I18n (
    
$language "en";
    
$locale = ;
    
$directory "lang";
    
$lang_hash = array (
        
"en" => array (
            
"Home" => "Home"
        
)
    );
    
$hash_order = array (
        
"en"
    
);
    
$charset "UTF-8";
    
$fullname "English";
    
$date_format "mmmm d, yyyy";
    
$short_format "mmm d";
    
$time_format "h:MMa";
    
$fallbacks = array ();
    
$languages = array (
        
"de" => array (
            
"name" => "Deutsch"
            "code" 
=> "de"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "default" 
=> ""
            "date_format" 
=> "d mmmm yyyy"
            "short_format" 
=> "d mmm"
            "time_format" 
=> "HH:MM"
        
)
        
"en" => array (
            
"name" => "English"
            "code" 
=> "en"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> 1
        
)
        
"fr" => array (
            
"name" => "Français"
            "code" 
=> "fr"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
        
)
        
"it" => array (
            
"name" => "Italiano"
            "code" 
=> "it"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "default" 
=> ""
        
)
        
"nl" => array (
            
"name" => "Nederlands"
            "code" 
=> "nl"
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
        
)
        
"sl_si" => array (
            
"name" => "Slovenščina"
            "code" 
=> "sl"
            "locale" 
=> "si"
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
        
)
        
"cs" => array (
            
"name" => "Česky"
            "code" 
=> "cs"
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
            "locale" 
=> ""
            "date_format" 
=> "d.mmmm yyyy"
            "short_format" 
=> "dd.mm.yyyy"
            "time_format" 
=> "HH:MM"
        
)
        
"ru" => array (
            
"name" => "Русский"
            "code" 
=> "ru"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
            "date_format" 
=> "dd mmmm yyyy"
            "short_format" 
=> "dd mmm"
            "time_format" 
=> "HH:MM"
        
)
        
"uk" => array (
            
"name" => "Українська"
            "code" 
=> "uk"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
            "date_format" 
=> "dd mmmm yyyy"
            "short_format" 
=> "dd mmm"
            "time_format" 
=> "HH:mm"
        
)
        
"ja" => array (
            
"name" => "日本語"
            "code" 
=> "ja"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
        
)
        
"zh" => array (
            
"name" => "简体中文"
            "code" 
=> "zh"
            "locale" 
=> ""
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
        
)
    );
    
$cookieName "lang";
    
$url_includes_lang false;
    
$new_request_uri "";
    
$prefix "";
    
$negotiation "http";
    
$error = ;
    
$default "en";
);

$cache_uri "_c_fbstatus_bullet";

$out false;

$appconf = array ();

$caching 1800;

$raw_status "";

$index 0;

$status = array ();