Browse Source

prevent errors if menu is not defined

tags/v1.0
parent
commit
01db93ed0f
1 changed files with 12 additions and 6 deletions
  1. +12
    -6
      index.php

+ 12
- 6
index.php View File

ROOT.'content/' // content folders can contain .html templates ROOT.'content/' // content folders can contain .html templates
))); )));


if(!is_dir($f3->get('TEMP'))) {
mkdir($f3->get('TEMP'));
}





///////////////////////// /////////////////////////
} else { } else {
$menu=$f3->get('nav.network.'.$f3->get('default_lang')); $menu=$f3->get('nav.network.'.$f3->get('default_lang'));
} }
foreach($menu as $k=>$v) {
$ex = explode(": ", $menu[$k]);
$menu[$k] = array(
'name' => trim($ex[0]),
'href' => count($ex) > 1 ? $ex[1] : $ex
);
if(is_array($menu)) {
foreach($menu as $k=>$v) {
$ex = explode(": ", $menu[$k]);
$menu[$k] = array(
'name' => trim($ex[0]),
'href' => count($ex) > 1 ? $ex[1] : $ex
);
}
} }
$f3->set('navi.network._config.addHome', $f3->get('nav.network.config.addHome')); $f3->set('navi.network._config.addHome', $f3->get('nav.network.config.addHome'));
$f3->set('navi.network', $menu); $f3->set('navi.network', $menu);

Loading…
Cancel
Save