From 9fa58ac5a5d50db46e59c8776ff56f88c8630a2d Mon Sep 17 00:00:00 2001 From: David Siegfried <david.siegfried@uni-vechta.de> Date: Mon, 6 Mar 2023 12:41:23 +0000 Subject: [PATCH] prevent php-warnings, refs #2271 Merge request studip/studip!1497 --- app/controllers/admin/courses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/courses.php b/app/controllers/admin/courses.php index 73283801b7b..49703ead3c6 100644 --- a/app/controllers/admin/courses.php +++ b/app/controllers/admin/courses.php @@ -592,7 +592,7 @@ class Admin_CoursesController extends AuthenticatedController $inst = explode('_', Request::option('institute')); $GLOBALS['user']->cfg->store('MY_INSTITUTES_DEFAULT', $inst[0]); - if ($inst[1] === 'withinst') { + if (isset($inst[1]) && $inst[1] === 'withinst') { $GLOBALS['user']->cfg->store('MY_INSTITUTES_INCLUDE_CHILDREN', 1); } else { $GLOBALS['user']->cfg->store('MY_INSTITUTES_INCLUDE_CHILDREN', 0); -- GitLab