ErrorException: Invalid argument supplied for foreach()

Debugger::handle_error (2, "Invalid argument supplied for foreach()", "/home/cerezomo/not/apps/blog/handlers/tag.php", 33, array(13))

33/home/cerezomo/not/apps/blog/handlers/tag.php

31. }
32.
33. foreach ($posts as $post) {
34.     $post->url '/blog/post/' $post->id '/' URLify::filter ($post->title);
35.     $post->tag_list = (strlen ($post->tags) > 0) ? explode (','$post->tags) : array ();

require ("/home/cerezomo/not/apps/blog/handlers/tag.php")

471/home/cerezomo/not/lib/Controller.php

469.         // Run the handler and get its output
470.         ob_start ();
471.         $res = require ($handler);
472.         $out ob_get_clean ();
473.         if (is_string ($res) && strlen ($res) > 0) {

Controller->handle ("apps/blog/handlers/tag.php", false)

175/home/cerezomo/not/lib/FrontController.php

173.             $handler $controller->route ($_SERVER['REQUEST_URI']);
174.         }
175.         $page->body $controller->handle ($handlerfalse);
176.
177.         /**

FrontController::run (array(1), 1)

34/home/cerezomo/not/index.php

32. $argc = isset ($argc) ? $argc null;
33. $argv = isset ($argv) ? $argv null;
34. return FrontController::run ($argv$argc);

Error Context

$_COOKIE = array (
    
"mediaplan" => "R2045096456"
);

$_SERVER = array (
    
"PATH" => "/usr/local/bin:/usr/bin:/bin"
    "REDIRECT_STATUS" 
=> 200
    
"UNIQUE_ID" => "W-O49AoAUzsAAExvXTkAAACO"
    "GEOIP_COUNTRY_CODE" 
=> "US"
    "GEOIP_COUNTRY_NAME" 
=> "United States"
    "GEOIP_REGION" 
=> "VA"
    "GEOIP_CITY" 
=> "Ashburn"
    "GEOIP_DMA_CODE" 
=> 511
    
"GEOIP_AREA_CODE" => 703
    
"GEOIP_LATITUDE" => 39.048100
    
"GEOIP_LONGITUDE" => -77.472801
    
"SCRIPT_URL" => "/blog/tag/organismos g.m"
    "SCRIPT_URI" 
=> "http://noteduermas.com/blog/tag/organismos g.m"
    "CFG_CLUSTER" 
=> "cluster006"
    "ENVIRONMENT" 
=> "production"
    "APP_ENGINE_VERSION" 
=> 7.0
    
"APP_ENGINE" => "phpcgi"
    "HTTP_REMOTE_IP" 
=> "54.234.13.175"
    "HTTP_HOST" 
=> "noteduermas.com"
    "HTTP_COOKIE" 
=> "mediaplan=R2045096456"
    "HTTP_X_PREDICTOR" 
=> 1
    
"HTTP_CONNECTION" => "close"
    "HTTP_USER_AGENT" 
=> "CCBot/2.0 (https://commoncrawl.org/faq/)"
    "HTTP_ACCEPT" 
=> "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    "HTTP_IF_MODIFIED_SINCE" 
=> "Thu, 20 Sep 2018 20:11:14 GMT"
    "HTTP_ACCEPT_ENCODING" 
=> "gzip"
    "HTTP_X_FORWARDED_FOR" 
=> "54.234.13.175"
    "HTTP_X_FORWARDED_PORT" 
=> 80
    
"HTTP_X_FORWARDED_PROTO" => "http"
    "HTTP_X_REMOTE_PORT" 
=> 41462
    
"HTTP_X_REMOTE_IP" => "54.234.13.175"
    "HTTP_X_REMOTE_PROTO" 
=> "http"
    "HTTP_FORWARDED" 
=> "for=54.234.13.175; proto=http; host=noteduermas.com"
    "HTTP_REMOTE_PORT" 
=> 41462
    
"HTTP_X_CDN_ANY_IP" => "87.98.231.17"
    "SERVER_SIGNATURE" 
=> ""
    "SERVER_SOFTWARE" 
=> "Apache"
    "SERVER_NAME" 
=> "noteduermas.com"
    "SERVER_ADDR" 
=> "10.0.97.17"
    "SERVER_PORT" 
=> 80
    
"REMOTE_ADDR" => "54.234.13.175"
    "DOCUMENT_ROOT" 
=> "/home/cerezomo/not"
    "SERVER_ADMIN" 
=> "postmaster@noteduermas.com"
    "SCRIPT_FILENAME" 
=> "/home/cerezomo/not/index.php"
    "REMOTE_PORT" 
=> 38600
    
"REDIRECT_URL" => "/blog/tag/organismos g.m"
    "GATEWAY_INTERFACE" 
=> "CGI/1.1"
    "SERVER_PROTOCOL" 
=> "HTTP/1.1"
    "REQUEST_METHOD" 
=> "GET"
    "QUERY_STRING" 
=> ""
    "REQUEST_URI" 
=> "/blog/tag/organismos%20g.m"
    "SCRIPT_NAME" 
=> "/index.php"
    "UID" 
=> "cerezomo"
    "PHP_SELF" 
=> "/index.php"
    "REQUEST_TIME_FLOAT" 
=> 1542699252.7331
    
"REQUEST_TIME" => 1542699252
    
"argv" => array (
        
"index.php"
    
)
    
"argc" => 1
);

$handler "apps/blog/handlers/tag.php";

$internal false;

$data = array ();

$page Page (
    
$head "";
    
$tail "";
    
$title "";
    
$_menu_title "";
    
$_window_title "";
    
$body "";
    
$layout "default";
    
$scripts = array ();
    
$is_being_rendered false;
    
$cache_control true;
    
$preview false;
    
$id "blog";
    
$limit 10;
    
$tag "organismos g.m";
    
$num 0;
    
$offset 0;
    
$count false;
    
$last 1;
    
$more false;
    
$next 2;
);

$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 (
            
"organismos%20g.m"
        
);
        
$internal false;
        
$data = array ();
        
$cli false;
        
$put_data = ;
        
$app "blog";
        
$uri "blog/tag/organismos%20g.m";
        
$chunked false;
        
$cache false;
        
$status_code false;
);
);

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

$i18n I18n (
    
$language "es_es";
    
$locale = ;
    
$directory "lang";
    
$lang_hash = array (
        
"es_es" => array (
            
"- select -" => "-seleccionar-"
            "Open link in new tab" 
=> "Abrir enlace en nueva pestaña"
            "Back" 
=> "Atrás"
            "Auto-post options" 
=> "Autopostear - Opciones"
            "Author" 
=> "Autor"
            "Add Blog Post" 
=> "Añadir Post a Blog"
            "Add Page" 
=> "Añadir Página"
            "Add {{appname|ucfirst}}" 
=> "Añadir {{appname|ucfirst}}"
            "No posts yet... :(" 
=> "Aún no hay Post...:/"
            "Draft" 
=> "Borrador"
            "Delete" 
=> "Borrar"
            "Search" 
=> "Buscar"
            "Custom Fields" 
=> "Campos personalizados"
            "Cancel" 
=> "Cancelar"
            "Password" 
=> "Clave"
            "Click here to restore." 
=> "Click aquí para restaurar"
            "Settings" 
=> "Configuración"
            "Blog Settings" 
=> "Configuración Blog"
            "Settings saved." 
=> "Configuración guardada"
            "Body" 
=> "Cuerpo"
            "Auto-saved data found for this form." 
=> "Datos de autosalvado encontrados para este formulario"
            "You must enter an author." 
=> "Debes ingresar un autor"
            "You must enter body content." 
=> "Debes ingresar un contenido para el cuerpo"
            "You must enter a title." 
=> "Debes ingresar un título"
            "You must select a date/time." 
=> "Debes ingresar una fecha/hora"
            "Unlink" 
=> "Desenlazar"
            "Undo" 
=> "Deshacer"
            "Edit" 
=> "Editar"
            "Edit Post" 
=> "Editar Post"
            "Editing Locked" 
=> "Editar está deshabilitado"
            "Edit Blog Post" 
=> "Editar post del blog"
            "Choose" 
=> "Elegir"
            "Choose an image" 
=> "Elegir una imagen"
            "Email" 
=> "Email"
            "Incorrect email or password, please try again." 
=> "Email incorrecto o clave, inténtalo de nuevo"
            "Embed" 
=> "Embebido"
            "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" 
=> "Ene Feb Mar Abr May Jun Jul Ago Sep Oct Nov Dic"
            "January February March April May June July August September October November December" 
=> "Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre"
            "Link" 
=> "Enlace"
            "Tagged: %s" 
=> "Etiquetado: %s"
            "Tags" 
=> "Etiquetas"
            "Tags (comma-separated)" 
=> "Etiquetas (Separadas por comas)"
            "Failed to save..." 
=> "Fallo al guardar..."
            "Date/Time" 
=> "Fecha/Hora"
            "Saved!" 
=> "Guardado!!"
            "Saving..." 
=> "Guardando..."
            "Save & Keep Editing" 
=> "Guardar & Mantener editando"
            "Save Blog Post" 
=> "Guardar Post en el blog"
            "Import Posts" 
=> "Importar Posts"
            "Unable to save changes. Check your folder permissions and try again." 
=> "Imposible guardar cambios. Revisa tu carpeta permisos e inténtalo de nuevo"
            "Insert" 
=> "Insertar"
            "Insert Link" 
=> "Insertar enlace"
            "Read more" 
=> "Leer Más"
            "Clear" 
=> "Limpiar"
            "Error Message" 
=> "Mensaje de Error"
            "Thumbnail" 
=> "Miniatura"
            "No" 
=> "No"
            "Unable to load the dynamic object list. Please try again in a few seconds." 
=> "No se puede cargar la lista, inténtalo de nuevo"
            "New Post" 
=> "Nuevo Post"
            "Newer posts" 
=> "Nuevos Posts"
            "Dynamic Objects" 
=> "Objeto Dinámico"
            "Extra Options" 
=> "Opciones Extra"
            "Please log in to continue." 
=> "Por favor logueate para continuar"
            "Blog post deleted." 
=> "Post del blog borrado"
            "Blog post saved." 
=> "Post del blog guardado."
            "Blog post added." 
=> "Post ha sido añadido"
            "Post not found" 
=> "Post no encontrado"
            "Posts by %s" 
=> "Post por %s"
            "Blog Posts" 
=> "Posts del Blog"
            "Preview" 
=> "Previsualizar"
            "Scheduled" 
=> "Programado"
            "Published" 
=> "Publicado"
            "Page" 
=> "Página"
            "Page created." 
=> "Página creada"
            "Redo" 
=> "Rehacer"
            "Yes" 
=> "Si"
            "Sign in" 
=> "Sign In"
            "You might also like:" 
=> "Te podría gustar también:"
            "Text" 
=> "Texto"
            "All tags" 
=> "Todas las Etiquetas"
            "All Dates" 
=> "Todas las fechas"
            "Title" 
=> "Título"
            "URL" 
=> "URL"
            "Hmm, we can't seem to find the post you wanted at the moment." 
=> "Um.... nosotros no encontramos el post que estás buscando"
            "An Error Occurred" 
=> "Un error ha ocurrido"
            "Older posts" 
=> "Viejos Posts"
            "Visit your website." 
=> "Visita tu sitio web"
            "comments" 
=> "comentarios"
            "by" 
=> "por"
            "Are you sure you want to delete this post?" 
=> "¿Estas seguro de borrar este post?"
            "Are you sure you want to cancel and lose any changes?" 
=> "¿Estás seguro que quieres cancel y perder todos los cambios?"
            "Latest Posts" 
=> "Últimos Post"
        
)
    );
    
$hash_order = array (
        
"es_es"
    
);
    
$charset "UTF-8";
    
$fullname "spanish";
    
$day_date_format "dddd, mmmm d, yyyy";
    
$short_day_date_format "ddd, mmm d";
    
$date_format "mmmm d, yyyy";
    
$short_format "mmm d";
    
$time_format "h:MMa";
    
$year_format "yyyy";
    
$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" 
=> ""
        
)
        
"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" 
=> ""
        
)
        
"pt_br" => array (
            
"name" => "Português brasileiro"
            "code" 
=> "pt"
            "locale" 
=> "br"
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
            "date_format" 
=> "mmmm d, yyyy"
            "short_format" 
=> "mmm d"
            "time_format" 
=> "h:MMa"
        
)
        
"sl_si" => array (
            
"name" => "Slovenščina"
            "code" 
=> "sl"
            "locale" 
=> "si"
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> ""
        
)
        
"es_es" => array (
            
"name" => "spanish"
            "code" 
=> "es"
            "locale" 
=> "es"
            "charset" 
=> "UTF-8"
            "fallback" 
=> ""
            "default" 
=> 1
            
"date_format" => "mmmm d, yyyy"
            "short_format" 
=> "mmm d"
            "time_format" 
=> "h:MMa"
        
)
        
"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 "es_es";
);

$cache_uri "_c_blog_tag_organismos%20g.m";

$out false;

$appconf = array (
    
"Blog" => array (
        
"title" => "Blog"
        "layout" 
=> "default"
        "post_layout" 
=> "bootstrap_indice"
        "include_in_nav" 
=> 1
        
"preview_chars" => 600
        
"post_format" => "html"
        "comments" 
=> "facebook"
        "show_related_posts" 
=> 1
        
"disqus_shortname" => ""
    
)
    
"Social Buttons" => array (
        
"twitter" => 1
        
"facebook" => 1
        
"google" => 1
    
)
    
"Custom Handlers" => array (
        
"blog/index" => "blog/index"
        "blog/post" 
=> "blog/post"
    
)
    
"Admin" => array (
        
"handler" => "blog/admin"
        "name" 
=> "Blog Posts"
        "install" 
=> "blog/upgrade"
        "upgrade" 
=> "blog/upgrade"
        "version" 
=> "1.1.4-stable"
        "sitemap" 
=> "blog\Post::sitemap"
        "search" 
=> "blog\Post::search"
    
)
);

$preview_chars 600;

$p blog\Post (
    
$table "#prefix#blog_post";
    
$_extended_field "extra";
    
$_extended false;
    
$key "id";
    
$keyval false;
    
$data = array ();
    
$fields = array ();
    
$error false;
    
$is_new true;
    
$query_fields "*";
    
$query_order "";
    
$query_group "";
    
$query_filters = array ();
    
$query_params = array ();
    
$query_having = array ();
    
$query_from false;
    
$verify = array ();
    
$failed = array ();
);

$posts false;