From a6bfed9d863dd8ce484c8a6bd48b3f869732c5b4 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Thu, 27 Jul 2023 16:15:46 +0200 Subject: [PATCH] Bugfix --- db/upgrade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/upgrade.php b/db/upgrade.php index 60d056f..1a42655 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -359,8 +359,9 @@ function xmldb_local_treestudyplan_upgrade($oldversion) { // If no end time is given, assume a year duration for period calculations $ydelta = (365*24*60*60)/$pcount; } - - $ydelta = $yend - $ystart; + else{ + $ydelta = $yend - $ystart; + } $ptime = $ydelta / $pcount; for($i=0; $i < $pcount; $i++){