Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Commit

Permalink
Fix error that could be caused when a variable was not logged or did …
Browse files Browse the repository at this point in the history
…have no logged values
  • Loading branch information
Radulf321 committed Jul 17, 2018
1 parent f22cf4a commit 0f3884b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions AnwesenheitsSimulation/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ private function GetDayData($day, $targetIDs) {
$dayStart = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$dayDiff = $day * 24 * 3600;
$dayData = array();
$values = array();

//Going through all linked variables
foreach($targetIDs as $targetID) {
Expand All @@ -120,9 +119,7 @@ private function GetDayData($day, $targetIDs) {
}

// return all values for linked variables for one day in a array
if (sizeof($values) > 0){
return array("Date" => date("d.m.Y", $dayStart - $dayDiff), "Data" => $dayData);
}
return array("Date" => date("d.m.Y", $dayStart - $dayDiff), "Data" => $dayData);

}

Expand Down

0 comments on commit 0f3884b

Please sign in to comment.