Skip to content
Snippets Groups Projects
Commit 0313846a authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

prevent php8 warning, fixes #2191

Closes #2191

Merge request studip/studip!1415
parent 9665c51f
No related branches found
No related tags found
1 merge request!4Draft: Icon creation
......@@ -37,7 +37,7 @@ class Admission_RestrictedCoursesController extends AuthenticatedController
$sem_condition = "";
foreach (words('current_institut_id sem_name_prefix') as $param) {
$this->$param = $_SESSION[get_class($this)][$param];
$this->$param = $_SESSION[get_class($this)][$param] ?? null;
}
if (Request::isPost()) {
if (Request::submitted('choose_institut')) {
......@@ -65,6 +65,10 @@ class Admission_RestrictedCoursesController extends AuthenticatedController
$this->my_inst = $this->get_institutes($sem_condition);
}
$this->courses = $this->get_courses($sem_condition);
if (!isset($_SESSION[get_class($this)])) {
$_SESSION[get_class($this)] = [];
}
foreach (words('current_institut_id sem_name_prefix') as $param) {
$_SESSION[get_class($this)][$param] = $this->$param;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment