From 75e17e60be22f07e84a22493aff27a163a5c66b3 Mon Sep 17 00:00:00 2001 From: anoack <noack@data-quest.de> Date: Thu, 31 Aug 2023 16:31:53 +0200 Subject: [PATCH] fix Call to a member function getStartWeeks() on null --- plugin.manifest | 2 +- views/copy/semester_start_und_ende.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin.manifest b/plugin.manifest index 0247785..e228072 100755 --- a/plugin.manifest +++ b/plugin.manifest @@ -1,6 +1,6 @@ pluginname=CourseCopy pluginclassname=CourseCopy -version=1.9.4 +version=1.9.5 origin=data-quest studipMinVersion=4.0 studipMaxVersion=5.3.99 diff --git a/views/copy/semester_start_und_ende.php b/views/copy/semester_start_und_ende.php index 22a78a7..f2a4a72 100755 --- a/views/copy/semester_start_und_ende.php +++ b/views/copy/semester_start_und_ende.php @@ -1,6 +1,7 @@ <?php -$start_weeks = $semester->getStartWeeks(); -$last_week = count($start_weeks) - 1; +if ($semester) { + $start_weeks = $semester->getStartWeeks(); + $last_week = count($start_weeks) - 1; ?> <label> <?= _("Startwoche") ?> @@ -29,3 +30,5 @@ $last_week = count($start_weeks) - 1; <? endforeach ?> </select> </label> +<?php +} -- GitLab