From 52ef1adf209b4d29e1bbc793562bc2ee5974096f Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 6 Jul 2015 08:02:27 +0000 Subject: [PATCH] (legacy) fix some more php notices --- src/www/guiconfig.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/www/guiconfig.inc b/src/www/guiconfig.inc index a22ffe93f..abd840345 100644 --- a/src/www/guiconfig.inc +++ b/src/www/guiconfig.inc @@ -30,7 +30,7 @@ /* Include authentication routines */ /* THIS MUST BE ABOVE ALL OTHER CODE */ -if(!$nocsrf) { +if(isset($nocsrf) && !$nocsrf) { function csrf_startup() { csrf_conf('rewrite-js', '/csrf/csrf-magic.js'); @@ -42,7 +42,7 @@ function csrf_startup() { } /* make sure nothing is cached */ -if (!$omit_nocacheheaders) { +if (isset($omit_nocacheheaders) && $omit_nocacheheaders) { header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); @@ -58,9 +58,9 @@ require_once("functions.inc"); $g['theme'] = get_current_theme(); /* Set the default interface language */ -if($config['system']['language'] <> "") { +if(isset($config['system']['language']) && $config['system']['language'] <> "") { $g['language'] = $config['system']['language']; -} elseif ($g['language'] == "") { +} elseif (!isset($g['language']) || $g['language'] == "") { $g['language'] = 'en_US'; }