Browse Source

error handling for settings files

master
Tsia 3 years ago
parent
commit
756d0f7dca
  1. 3
      index.php

3
index.php

@ -205,6 +205,9 @@ $twig->addFunction(new Twig_Function('getPageMeta', function ($path = '/', $sort
$settingsfile = preg_replace('/\\.twig$/', '.ini', $file->getRealPath());
if(file_exists($settingsfile)){
$data = parse_ini_file($settingsfile, true);
if(!is_array($data)){
echo 'could not parse '.$settingsfile;die();
}
}else{
$data = $defaultParams;
}

Loading…
Cancel
Save