From: Hypolite Petovan Date: Sat, 3 Feb 2018 13:42:12 +0000 (-0500) Subject: Use defaults for setting session variables in index.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3df7502dcf8dfe888e54fdf5ac9d4c13ef204bcd;p=friendica.git Use defaults for setting session variables in index.php --- diff --git a/index.php b/index.php index af493f2016..ef84400990 100644 --- a/index.php +++ b/index.php @@ -166,19 +166,10 @@ if (! x($_SESSION, 'authenticated')) { $a->page['htmlhead'] = ''; $a->page['end'] = ''; +$_SESSION['sysmsg'] = defaults($_SESSION, 'sysmsg' , []); +$_SESSION['sysmsg_info'] = defaults($_SESSION, 'sysmsg_info' , []); +$_SESSION['last_updated'] = defaults($_SESSION, 'last_updated', []); -if (x($_SESSION, 'sysmsg') === false) { - $_SESSION['sysmsg'] = []; -} - -if (x($_SESSION, 'sysmsg_info') === false) { - $_SESSION['sysmsg_info'] = []; -} - -// Array for informations about last received items -if (x($_SESSION, 'last_updated') === false) { - $_SESSION['last_updated'] = []; -} /* * check_config() is responsible for running update scripts. These automatically * update the DB schema whenever we push a new one out. It also checks to see if