Skip to content

Instantly share code, notes, and snippets.

@betaman
Created December 5, 2012 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betaman/4218380 to your computer and use it in GitHub Desktop.
Save betaman/4218380 to your computer and use it in GitHub Desktop.
Error on I18n elefant
ErrorException: Invalid argument supplied for foreach()
Debugger::handle_error (2, "Invalid argument supplied for foreach()", "/www/htdocs/v151009/jv/apps/translator/handlers/build.php", 49, array(16))
49/www/htdocs/v151009/jv/apps/translator/handlers/build.php
47. foreach ($sources as $source) {
48. $files = glob ($source);
49. foreach ($files as $file) {
50. $data = file_get_contents ($file);
51. if (preg_match ('/\.html/', $file)) {
require ("/www/htdocs/v151009/jv/apps/translator/handlers/build.php")
403/www/htdocs/v151009/jv/lib/Controller.php
401. // Run the handler and get its output
402. ob_start ();
403. require ($handler);
404. $out = ob_get_clean ();
405.
Controller->handle ("apps/translator/handlers/build.php", false)
146/www/htdocs/v151009/jv/index.php
144. $handler = $controller->route ($_SERVER['REQUEST_URI']);
145. }
146. $page->body = $controller->handle ($handler, false);
147.
148. /**
Error Context
$handler = "apps/translator/handlers/build.php";
$internal = false;
$data = "<!DOCTYPE html>
<html>
<head>
<title>{{ conf('General', 'site_name') }} - {{ window_title|none }}</title>
<meta charset="{{ i18n.charset }}" />
{% if detect('mobile') %}
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/css/mobile.css" />
{% else %}
<link rel="stylesheet" type="text/css" href="/css/reset.css" />
<link rel="stylesheet" type="text/css" href="/css/text.css" />
<link rel="stylesheet" type="text/css" href="/css/960.css" />
<link rel="stylesheet" type="text/css" href="/css/style.css" />
{% end %}
{! admin/head !}
{{ head|none }}
</head>
<body>
<div id="wrapper" class="container_12">
<div id="head" class="grid_12">
<div class="grid_6 alpha">
<h1>{{ conf('General', 'site_name') }}</h1>
</div>
<div class="grid_6 omega menu">
{! navigation/top !}
</div>
</div>
<div class="clear"></div>
{% if id === 'index' %}
<div id="body" class="grid_12 index-body">
{! filemanager/slideshow?path=homepage !}
{% if title != '' %}<h2>{{ title|none }}</h2>{% end %}
{{ body|none }}
</div>
{% else %}
<div id="body" class="grid_8">
{% if title != '' %}<h2>{{ title|none }}</h2>{% end %}
{{ body|none }}
</div>
<div id="sidebar" class="grid_4">
{! blocks/index?id=sidebar-[id]&fallback=members !}
</div>
{% end %}
<div class="clear"></div>
<div id="footer" class="grid_12">
<div class="grid_6 alpha menu">
{! navigation/top !}
</div>
<div class="grid_6 omega powered">
{"Powered by"} <a href="http://www.elefantcms.com/">Elefant CMS</a><br />
{"Photos by"} <a href="http://www.rachaelhosein.com/">Rachael Hosein</a>
</div>
</div>
<div class="clear"></div>
</div>
{{ tail|none }}
</body>
</html>";
$page = Page (
$head = "";
$tail = "";
$title = "";
$_menu_title = "";
$_window_title = "";
$body = "";
$layout = "admin";
$scripts = array ();
$is_being_rendered = false;
$preview = false;
);
$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 (
"running"
);
$internal = false;
$data = array ();
$cli = false;
$put_data = ;
$app = "translator";
$uri = "translator/build/running";
$chunked = false;
$cache = false;
);
);
$cache = Cache (
$dir = "cache/datastore";
);
$cache_uri = "_c_translator_build_running";
$out = false;
$appconf = array (
"Admin" => array (
"handler" => "translator/index"
"name" => "Languages"
)
);
$sources = array (
"layouts/*.html"
"layouts/*/*.html"
"apps/*/views/*.html"
"apps/*/views/*/*.html"
"apps/*/views/*/*/*.html"
"apps/*/handlers/*.php"
"apps/*/handlers/*/*.php"
"apps/*/handlers/*/*/*.php"
"apps/*/lib/*.php"
"apps/*/models/*.php"
"install/*.php"
"install/layouts/*.html"
);
$list = array (
"Powered by" => array (
"orig" => "Powered by"
"src" => "layouts/admin.html"
)
"Photos by" => array (
"orig" => "Photos by"
"src" => "layouts/default.html"
)
);
$source = "layouts/*/*.html";
$files = false;
$file = "layouts/default.html";
$matches = array (
array (
"{"Powered by"}"
"{"Photos by"}"
)
array (
"Powered by"
"Photos by"
)
);
$str = "Photos by";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment