diff --git a/app/views/calendar/schedule/_entry_schedule.php b/app/views/calendar/schedule/_entry_schedule.php
index 6f3d8ffa16b8cfc9b2cd81014904d1526578e1fa..ad5bbcd6503b3d3297543ec036a24b50e82c0aae 100644
--- a/app/views/calendar/schedule/_entry_schedule.php
+++ b/app/views/calendar/schedule/_entry_schedule.php
@@ -1,5 +1,5 @@
 <form class="default"
-      action="<?= $controller->link_for('calendar/schedule/addentry' . ($show_entry['id'] ? '/' . $show_entry['id'] : '')) ?>"
+      action="<?= $controller->link_for('calendar/schedule/addentry', $show_entry['id'] ?? null) ?>"
       method="post" name="edit_entry" onSubmit="return STUDIP.Schedule.checkFormFields()">
     <?= CSRFProtection::tokenTag() ?>
     <fieldset>
@@ -22,38 +22,38 @@
         <label class="col-2">
             <?= _('von') ?>
             <input class="size-s studip-timepicker" placeholder="HH:mm" type="text" size="2" name="entry_start"
-                   value="<?= $show_entry['start'] ? $show_entry['start_formatted'] : '' ?>"
+                   value="<?= !empty($show_entry['start']) ? $show_entry['start_formatted'] : '' ?>"
                    id="entry-start" data-time-picker>
         </label>
 
         <label class="col-2">
             <?= _('bis') ?>
             <input class="size-s studip-timepicker" placeholder="HH:mm" type="text" size="2" name="entry_end"
-                   value="<?= $show_entry['end'] ? $show_entry['end_formatted'] : '' ?>"
+                   value="<?= !empty($show_entry['end']) ? $show_entry['end_formatted'] : '' ?>"
                    id="entry-end" data-time-picker>
         </label>
 
         <span class="invalid_message"><?= _('Die Endzeit liegt vor der Startzeit!') ?></span>
 
         <?= $this->render_partial('calendar/schedule/_colorpicker.php', [
-            'selected' => $show_entry['color'],
+            'selected' => $show_entry['color'] ?? null,
         ]) ?>
 
         <label>
             <?= _('Titel') ?>
-            <input type="text" name="entry_title" value="<?= htmlReady($show_entry['title']) ?>">
+            <input type="text" name="entry_title" value="<?= htmlReady($show_entry['title'] ?? '') ?>">
         </label>
 
         <label>
             <?= _('Beschreibung') ?>
             <textarea name="entry_content"
-                      rows="7"><?= htmlReady($show_entry['content']) ?></textarea>
+                      rows="7"><?= htmlReady($show_entry['content'] ?? '') ?></textarea>
         </label>
     </fieldset>
 
     <footer data-dialog-button>
         <?= Studip\Button::createAccept(_('Speichern'), ['style' => 'margin-right: 20px']) ?>
-        <? if ($show_entry['id']) : ?>
+        <? if (isset($show_entry['id'])) : ?>
             <?= Studip\LinkButton::create(
                 _('Löschen'),
                 $controller->url_for('calendar/schedule/delete/'. $show_entry['id']),
@@ -61,7 +61,7 @@
             ) ?>
         <? endif ?>
 
-        <? if ($show_entry) : ?>
+        <? if (!empty($show_entry)) : ?>
             <?= Studip\LinkButton::createCancel(
                 _('Abbrechen'),
                 $controller->url_for('calendar/schedule'),
diff --git a/app/views/calendar/schedule/entry.php b/app/views/calendar/schedule/entry.php
index b780aae8dd82d9f716dba63159634d3522876d57..66fe58edbb9a76b9109b6e0edcd85c803c5bdbab 100644
--- a/app/views/calendar/schedule/entry.php
+++ b/app/views/calendar/schedule/entry.php
@@ -1,4 +1,4 @@
-<? if ($show_entry && in_array($show_entry['type'], ['sem', 'virtual']) !== false) : ?>
+<? if (!empty($show_entry) && in_array($show_entry['type'], ['sem', 'virtual']) !== false) : ?>
     <?= $this->render_partial('calendar/schedule/_entry_course.php') ?>
     <? unset($this->show_entry) ?>
 <? elseif ($show_entry && $show_entry['type'] == 'inst') : ?>
diff --git a/lib/calendar/CalendarColumn.class.php b/lib/calendar/CalendarColumn.class.php
index 9292d0cf48578309f4b0bc3f71d7212046f55e47..3c071f1760855f764f45af7833d752bd2732b71f 100644
--- a/lib/calendar/CalendarColumn.class.php
+++ b/lib/calendar/CalendarColumn.class.php
@@ -333,7 +333,10 @@ class CalendarColumn
                 for ($i = floor($data['start'] / 100); $i <= floor($data['end'] / 100); $i++) {
                     for ($j = 0; $j < 60; $j++) {
                         if (($i * 100) + $j >= $data['start'] && ($i * 100) + $j < $data['end']) {
-                            $group_matrix[($i * 100) + $j]++;
+                            if (!isset($group_matrix[$i * 100 + $j])) {
+                                $group_matrix[$i * 100 + $j] = 0;
+                            }
+                            $group_matrix[$i * 100 + $j]++;
                         }
                     }
                 }
diff --git a/lib/classes/sidebar/SearchWidget.php b/lib/classes/sidebar/SearchWidget.php
index 71677fb3ae4e3af58ccf936077f9db00cb3e3f71..40a2eb9e990b39a5acec9312ba151c1400fc0272 100644
--- a/lib/classes/sidebar/SearchWidget.php
+++ b/lib/classes/sidebar/SearchWidget.php
@@ -159,6 +159,8 @@ class SearchWidget extends SidebarWidget
 
             $reset_link = URLHelper::getLink($this->url, array_merge($reset_params, ['reset-search' => 1]));
             $this->template_variables['reset_link'] = $reset_link;
+        } else {
+            $this->template_variables['reset_link'] = false;
         }
 
         $this->template_variables['needles'] = $this->needles;
diff --git a/lib/visual.inc.php b/lib/visual.inc.php
index 79157c1905f7c4b4adbfc1c93a7724576fa2416e..1c3cd9e16d5c55e87542f83029f0d602d7b33a53 100644
--- a/lib/visual.inc.php
+++ b/lib/visual.inc.php
@@ -285,8 +285,9 @@ function kill_format ($text) {
         $text = explode("[nop] [/nop]", $text);
         $i = 0;
         $all = '';
-        foreach ($text as $w)
-            $all .= $w . $matches[1][$i++];
+        foreach ($text as $w) {
+            $all .= $w . ($matches[1][$i++] ?? '');
+        }
 
         return $all;
     }