From e996b2c0cf9153b6ca049089b8008dbf229e8147 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Jun 2020 10:11:31 +0200 Subject: [PATCH] reverting 2 changes around sessions which break our installation checking for the not existing (new) database runs into an invinit recursion the checks not to use $_SESSION, if no session is active was added in an attempt to get SimpleSAMLphp discovery working, but seems unneccessary for what we currently use --- api/src/Cache.php | 2 +- api/src/Db.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Cache.php b/api/src/Cache.php index be56de9312..c859e0f6a5 100644 --- a/api/src/Cache.php +++ b/api/src/Cache.php @@ -402,7 +402,7 @@ class Cache */ static public function &getSession($app,$location,$callback=null,array $callback_params=array(),$expiration=0) { - if (!isset($_SESSION) || isset($_SESSION[Session::EGW_SESSION_ENCRYPTED])) + if (isset($_SESSION[Session::EGW_SESSION_ENCRYPTED])) { if (Session::ERROR_LOG_DEBUG) error_log(__METHOD__.' called after session was encrypted --> ignored!'); return null; // can no longer store something in the session, eg. because commit_session() was called diff --git a/api/src/Db.php b/api/src/Db.php index edb6e529e6..74616531b1 100644 --- a/api/src/Db.php +++ b/api/src/Db.php @@ -585,7 +585,7 @@ class Db { foreach(get_included_files() as $file) { - if (strpos($file,'adodb') !== false && !in_array($file,(array)$_SESSION['egw_required_files']) && isset($_SESSION)) + if (strpos($file,'adodb') !== false && !in_array($file,(array)$_SESSION['egw_required_files'])) { $_SESSION['egw_required_files'][] = $file; //error_log(__METHOD__."() egw_required_files[] = $file");