2013-03-22, 05:17:28
(2013-03-17, 17:33:45)Connie Wrote:Quote: Warning: Invalid argument supplied for foreach() in /var/www/web10/html/getsimple/plugins/i18n_base/frontend.class.php(127) : eval()'d code on line 4
[...]
this happens when using this component:
{% auszuege-subseiten %}
which contains:
PHP Code:<?php
$subpages = return_i18n_menu_data(return_page_slug(), 2, 2, I18N_SHOW_NORMAL);
foreach ($subpages as $slugexcerpt) {
echo '<h2>'.$slugexcerpt['title'].'</h2>';
echo page_excerpt(''.$slugexcerpt['url'].'',200);
}
?>
Looks like $subpages is assigned NULL for some reason.
To prevent this script breaking your page when this happens, change the foreach line by:
Code:
if ($subpages) foreach ($subpages as $slugexcerpt) {