Bladeren bron

Fixed regression introduced in [3852] : setup not working anymore ($_SESSION is unset and a notice is issued, which can prevent the install from completing, depending on your PHP error level).

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3891 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 jaren geleden
bovenliggende
commit
aa8c20050c
1 gewijzigde bestanden met toevoegingen van 8 en 2 verwijderingen
  1. 8 2
      core/userrights.class.inc.php

+ 8 - 2
core/userrights.class.inc.php

@@ -1108,12 +1108,18 @@ class UserRights
 	public static function _InitSessionCache()
 	public static function _InitSessionCache()
 	{
 	{
 		// Cache data about the current user into the session
 		// Cache data about the current user into the session
-		$_SESSION['profile_list'] = self::ListProfiles();
+		if (isset($_SESSION))
+		{
+			$_SESSION['profile_list'] = self::ListProfiles();
+		}
 	}
 	}
 
 
 	public static function _ResetSessionCache()
 	public static function _ResetSessionCache()
 	{
 	{
-		unset($_SESSION['profile_list']);
+		if (isset($_SESSION['profile_list']))
+		{
+			unset($_SESSION['profile_list']);
+		}
 	}
 	}
 }
 }