From 5fb0676c7b6c5da4f09645908943a1518523792d Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Tue, 11 Apr 2017 15:06:59 +0200
Subject: [PATCH] add isset($_SESSION) for php5 compatibility

---
 public_html/deployment/classes/user.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public_html/deployment/classes/user.class.php b/public_html/deployment/classes/user.class.php
index f412e8ed..6536ee96 100644
--- a/public_html/deployment/classes/user.class.php
+++ b/public_html/deployment/classes/user.class.php
@@ -58,7 +58,7 @@ class user {
      */
     private function _autoDetectUser(){
         $sUser=false;
-        if (is_array($_SESSION) && array_key_exists("PHP_AUTH_USER", $_SESSION)){
+        if (isset($_SESSION) && is_array($_SESSION) && array_key_exists("PHP_AUTH_USER", $_SESSION)){
             $sUser=$_SESSION["PHP_AUTH_USER"];
         }
         if (!$sUser && is_array($_SERVER) && array_key_exists("PHP_AUTH_USER", $_SERVER)){
-- 
GitLab