Commit 7db48fea authored by Dominik Hebeler's avatar Dominik Hebeler

Fixed an error in creating the files

parent 14359f4f
...@@ -32,7 +32,11 @@ class ConvertCountFile implements ShouldQueue ...@@ -32,7 +32,11 @@ class ConvertCountFile implements ShouldQueue
*/ */
public function handle() public function handle()
{ {
$result = []; $result = [
"insgesamt" => [
"all" => 0,
],
];
$fh = false; $fh = false;
$fullRound = false; $fullRound = false;
try { try {
...@@ -56,9 +60,6 @@ class ConvertCountFile implements ShouldQueue ...@@ -56,9 +60,6 @@ class ConvertCountFile implements ShouldQueue
} }
while (!$fullRound && ((intval($logTime[0]) * 60) + intval($logTime[1])) > (($currentLogTime->hour * 60) + $currentLogTime->minute)) { while (!$fullRound && ((intval($logTime[0]) * 60) + intval($logTime[1])) > (($currentLogTime->hour * 60) + $currentLogTime->minute)) {
if (empty($result["insgesamt"])) {
continue 2;
}
$result["time"][$currentLogTime->format('H:i')] = $result["insgesamt"]; $result["time"][$currentLogTime->format('H:i')] = $result["insgesamt"];
$currentLogTime->addMinutes(5); $currentLogTime->addMinutes(5);
if ($currentLogTime->hour === 0 && $currentLogTime->minute === 0) { if ($currentLogTime->hour === 0 && $currentLogTime->minute === 0) {
...@@ -87,6 +88,7 @@ class ConvertCountFile implements ShouldQueue ...@@ -87,6 +88,7 @@ class ConvertCountFile implements ShouldQueue
if ($fh !== false) { if ($fh !== false) {
fclose($fh); fclose($fh);
} }
$oldUmask = umask(0); $oldUmask = umask(0);
// Write the result to a File // Write the result to a File
if (!file_exists($this->files["countPath"])) { if (!file_exists($this->files["countPath"])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment