Skip to content
Snippets Groups Projects
Commit 2f85abeb authored by André Noack's avatar André Noack Committed by David Siegfried
Browse files

Resolve #1688 "Fatal Error im bootstrap mit PHP 8.1"

Closes #1688

Merge request studip/studip!1090
parent a862c55c
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,14 @@ if (isset($_SERVER['SERVER_NAME'])) {
$GLOBALS['ASSETS_URL'] = $ABSOLUTE_URI_STUDIP . 'assets/';
require __DIR__ . '/classes/StudipFileloader.php';
$added = StudipFileloader::load('config_defaults.inc.php config_local.inc.php', $GLOBALS, compact('STUDIP_BASE_PATH', 'ABSOLUTE_URI_STUDIP', 'ASSETS_URL', 'CANONICAL_RELATIVE_PATH_STUDIP'), true);
$added_configs = [];
StudipFileloader::load('config_defaults.inc.php config_local.inc.php', $added_configs, compact('STUDIP_BASE_PATH', 'ABSOLUTE_URI_STUDIP', 'ASSETS_URL', 'CANONICAL_RELATIVE_PATH_STUDIP'), true);
foreach($added_configs as $key => $value) {
$GLOBALS[$key] = $value;
}
// If no ENV setting was found in the config files, assume ENV=production
if (!defined('Studip\ENV')) {
......
......@@ -356,7 +356,7 @@ class Seminar_Auth
if ($check_auth['uid']) {
$uid = $check_auth['uid'];
if ($check_auth['need_email_activation'] == $uid) {
if (isset($check_auth['need_email_activation']) && $check_auth['need_email_activation'] == $uid) {
$this->need_email_activation = $uid;
$_SESSION['semi_logged_in'] = $uid;
return false;
......
......@@ -314,7 +314,7 @@ class Seminar_Session
$this->delete();
$this->start();
foreach ($keep_session_vars as $k) {
$_SESSION[$k] = $keep[$k];
$_SESSION[$k] = $keep[$k] ?? null;
}
}
......
......@@ -32,12 +32,16 @@ StudipAutoloader::addAutoloadPath($STUDIP_BASE_PATH . '/lib/plugins/db');
StudipAutoloader::addAutoloadPath($STUDIP_BASE_PATH . '/lib/plugins/engine');
// load config-variables
$added_configs = [];
StudipFileloader::load(
'config_defaults.inc.php config_local.inc.php',
$GLOBALS,
$added_configs,
compact('STUDIP_BASE_PATH', 'ABSOLUTE_URI_STUDIP', 'ASSETS_URL', 'CANONICAL_RELATIVE_PATH_STUDIP'),
true
);
foreach($added_configs as $key => $value) {
$GLOBALS[$key] = $value;
}
require 'config/config.inc.php';
// Do not send mails of any kind during tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment