diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-09-19 08:30:30 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-09-22 14:28:10 +0200 |
| commit | e6730ed107b1bbe9902a3cd4401f192d7b8238fc (patch) | |
| tree | 7e0eba4de981cbdb6e60f8770d79a84f8a62e21f /app | |
| parent | 3b6144170577c599ab2db5966305637c6cd7d4d4 (diff) | |
prevent warnings, fixes #5892
Closes #5892
Merge request studip/studip!4493
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/file.php | 2 | ||||
| -rw-r--r-- | app/views/admin/user/edit.php | 4 | ||||
| -rw-r--r-- | app/views/settings/studies/studiengang.php | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/file.php b/app/controllers/file.php index 50b2f9d..38bcc5c 100644 --- a/app/controllers/file.php +++ b/app/controllers/file.php @@ -80,7 +80,7 @@ class FileController extends AuthenticatedController throw new AccessDeniedException(); } if (Request::isPost()) { - if (is_array($_FILES['file'])) { + if (isset($_FILES['file']) && is_array($_FILES['file'])) { $validatedFiles = FileManager::handleFileUpload( $_FILES['file'], $folder, diff --git a/app/views/admin/user/edit.php b/app/views/admin/user/edit.php index 47596a9..2795ed2 100644 --- a/app/views/admin/user/edit.php +++ b/app/views/admin/user/edit.php @@ -433,7 +433,7 @@ use Studip\Button, Studip\LinkButton; <li> <?= sprintf( '%s, %s, %s. %s', - htmlReady($usc->studycourse->name), + htmlReady($usc->studycourse->name ?? _('Unbekannt')), htmlReady($usc->degree->name ?? _('Unbekannt')), htmlReady($usc->semester), _('Fachsemester') @@ -476,7 +476,7 @@ use Studip\Button, Studip\LinkButton; <ol class="default"> <? foreach ($student_institutes as $i => $inst_membership) : ?> <li> - <?= htmlReady($inst_membership->institute->name) ?> + <?= htmlReady($inst_membership->institute?->name ?? _('Unbekannt')) ?> ?> <? if ($GLOBALS['perm']->have_studip_perm('admin', $inst_membership->institut_id)) : ?> <?= Icon::create('trash')->asInput( diff --git a/app/views/settings/studies/studiengang.php b/app/views/settings/studies/studiengang.php index ec58d1f..e913cf4 100644 --- a/app/views/settings/studies/studiengang.php +++ b/app/views/settings/studies/studiengang.php @@ -43,7 +43,7 @@ <? foreach ($user->studycourses as $usc): ?> <tr> <td data-label="<?= _('Fach') ?>"><?= htmlReady($usc->studycourse->name) ?></td> - <td data-label="<?= _('Abschluss') ?>"><?= htmlReady($usc->degree->name) ?></td> + <td data-label="<?= _('Abschluss') ?>"><?= htmlReady($usc->degree->name ?? _('Unbekannt')) ?></td> <? if ($allow_change['sg']): ?> <td data-label="<?= _('Versionen') ?>"> <? $versionen = StgteilVersion::findByFachAbschluss($usc->fach_id, $usc->abschluss_id); ?> |
