remove static copyright-year in templates; fix possible undefined theme-variable in phpErrHandler by specifying a fallback-default

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-12-19 09:49:33 +01:00
parent c1ca72dd3c
commit 19f5f2a7a4
8 changed files with 14 additions and 4 deletions

View File

@@ -20,6 +20,11 @@ function phpErrHandler($errno, $errstr, $errfile, $errline, array $errcontext) {
if (!isset($_SERVER['SHELL']) || (isset($_SERVER['SHELL']) && $_SERVER['SHELL'] == '')) {
global $theme;
// fallback
if (empty($theme)) {
$theme = "Sparkle";
}
// if we're not on the shell, output a nicer error-message
$err_hint = file_get_contents(FROXLOR_INSTALL_DIR.'/templates/'.$theme.'/misc/phperrornice.tpl');
// replace values