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:13 +0200 |
| commit | 525c1e02b7e9b3fe57caa5f5eca7904099f8f14e (patch) | |
| tree | 1f79acae09c77442ccae698ba0f9d8d0fde55682 /app | |
| parent | e7e6ad26d433d82e4b46497cf019ddc998a03981 (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 98111d2..d1b4b62 100644 --- a/app/views/admin/user/edit.php +++ b/app/views/admin/user/edit.php @@ -423,7 +423,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') @@ -466,7 +466,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); ?> |
