aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-09-19 08:30:30 +0200
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-09-19 08:30:30 +0200
commit60dcac6e3c1ee532da14c3f21409f45b339325d8 (patch)
treec9d3982e5dfb6015bc2d6fa502309ce0f5251072 /app
parent053ebf7c43f8f84c4a2515b56560b50e266288d4 (diff)
prevent warnings, fixes #5892
Closes #5892 Merge request studip/studip!4493
Diffstat (limited to 'app')
-rw-r--r--app/controllers/file.php2
-rw-r--r--app/views/admin/user/edit.php4
-rw-r--r--app/views/settings/studies/studiengang.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/file.php b/app/controllers/file.php
index 1dbbf96..9a0ab81 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 d808a5b..de570cb 100644
--- a/app/views/admin/user/edit.php
+++ b/app/views/admin/user/edit.php
@@ -475,7 +475,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')
@@ -518,7 +518,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); ?>