diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-02 09:33:51 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-02 09:33:51 +0000 |
| commit | e55a7b7ba84e84f087c44a222c3df91960f03fc7 (patch) | |
| tree | e474aba4b4db3e41a185b5bf5b4b04e953a8e8bf /app/controllers/institute/basicdata.php | |
| parent | bd60f4a8b88c1f6173cf481ea4407668c1b0c4c0 (diff) | |
prevent php-warnings, closes #1807
Closes #1807
Merge request studip/studip!1187
Diffstat (limited to 'app/controllers/institute/basicdata.php')
| -rw-r--r-- | app/controllers/institute/basicdata.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/institute/basicdata.php b/app/controllers/institute/basicdata.php index a265cfe..2f13d9b 100644 --- a/app/controllers/institute/basicdata.php +++ b/app/controllers/institute/basicdata.php @@ -81,7 +81,7 @@ class Institute_BasicdataController extends AuthenticatedController } $lockrule = LockRules::getObjectRule($i_view); - if ($lockrule->description && LockRules::CheckLockRulePermission($i_view, $lockrule['permission'])) { + if ($lockrule && $lockrule->description && LockRules::CheckLockRulePermission($i_view, $lockrule['permission'])) { PageLayout::postInfo(formatLinks($lockrule->description)); } @@ -115,7 +115,7 @@ class Institute_BasicdataController extends AuthenticatedController // Read faculties if neccessary if (count($institute->sub_institutes) === 0) { if ($GLOBALS['perm']->have_perm('root')) { - $this->faculties = Institute::findBySQL('Institut_id = fakultaets_id ORDER BY Name ASC', [$i_view]); + $this->faculties = Institute::findBySQL('Institut_id = fakultaets_id ORDER BY Name ASC'); } else { $temp = User::find($GLOBALS['user']->id) ->institute_memberships->findBy('inst_perms', 'admin') @@ -127,7 +127,7 @@ class Institute_BasicdataController extends AuthenticatedController $this->faculties = $faculties; } } - + $reason_txt = ''; // Indicates whether the current user is allowed to delete the institute $this->may_delete = $i_view !== 'new' && !(count($institute->home_courses) || count($institute->sub_institutes)) |
