From d906cd4fbaf2e724e05bf997bf8479a33cdfde0b Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Tue, 21 Feb 2023 08:55:54 +0000
Subject: [PATCH] third batch of changes, re #2193

Merge request studip/studip!1425
---
 app/views/admin/autoinsert/index.php                    | 1 -
 app/views/institute/members/_table_body.php             | 8 ++++----
 app/views/studiengaenge/studiengaenge/studiengaenge.php | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/app/views/admin/autoinsert/index.php b/app/views/admin/autoinsert/index.php
index f69bc173ccd..0d57d4739ca 100644
--- a/app/views/admin/autoinsert/index.php
+++ b/app/views/admin/autoinsert/index.php
@@ -101,7 +101,6 @@
                     </a>
                 </td>
             </tr>
-            <? $i++ ?>
         <? endforeach; ?>
         </tbody>
     </table>
diff --git a/app/views/institute/members/_table_body.php b/app/views/institute/members/_table_body.php
index 8bce6d2e80b..2aa3704259e 100644
--- a/app/views/institute/members/_table_body.php
+++ b/app/views/institute/members/_table_body.php
@@ -8,10 +8,10 @@
         <th class="actions">
         <?= ActionMenu::get()
             ->setContext($th_title)
-            ->condition($mail_status)
+            ->condition($mail_status ?? false)
             ->addLink(
                 $controller->url_for('messages/write?filter=inst_status', [
-                    'who'             => $key,
+                    'who'             => $key ?? '',
                     'default_subject' => Context::get()->Name,
                     'inst_id'         => Context::getId(),
                 ]),
@@ -19,10 +19,10 @@
                 Icon::create('mail', 'clickable'),
                 ['data-dialog' => '']
             )
-            ->condition($mail_gruppe)
+            ->condition($mail_gruppe ?? false)
             ->addLink(
                 $controller->url_for('messages/write', [
-                    'group_id'        => $group->id,
+                    'group_id'        => $group->id ?? null,
                     'default_subject' => Context::get()->Name,
                 ]),
                 sprintf(_('Nachricht an alle Mitglieder der Gruppe %s verschicken'), $th_title),
diff --git a/app/views/studiengaenge/studiengaenge/studiengaenge.php b/app/views/studiengaenge/studiengaenge/studiengaenge.php
index 6d2ba908e0f..cbfc2cc3eff 100644
--- a/app/views/studiengaenge/studiengaenge/studiengaenge.php
+++ b/app/views/studiengaenge/studiengaenge/studiengaenge.php
@@ -19,8 +19,8 @@
             <td class="toggle-indicator">
                 <a class="mvv-load-in-new-row"
                    href="<?= $controller->action_link('details_studiengang/' . $studiengang->id) ?>">
-                    <? $ampel_icon = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$studiengang->stat]['icon'] ?>
-                    <? $ampelstatus = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$studiengang->stat]['name'] ?>
+                    <? $ampel_icon = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$studiengang->stat]['icon'] ?? null; ?>
+                    <? $ampelstatus = $GLOBALS['MVV_STUDIENGANG']['STATUS']['values'][$studiengang->stat]['name'] ?? null; ?>
                     <? if ($ampel_icon) : ?>
                         <?= $ampel_icon->asImg(['title' => $ampelstatus, 'style' => 'vertical-align: text-top;']) ?>
                     <? endif; ?>
-- 
GitLab