From f54aefb6cf023971b6924577e2b4883ec09f9700 Mon Sep 17 00:00:00 2001 From: Brovning <39644775+Brovning@users.noreply.github.com> Date: Fri, 25 Feb 2022 18:34:37 +0100 Subject: [PATCH] #18 TypeError getPowerSumOfLog() #18 Uncaught TypeError: Argument 3 passed to E3DC::getPowerSumOfLog() must be of the type int --- libs/myFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/myFunctions.php b/libs/myFunctions.php index eb883d6..0b65263 100644 --- a/libs/myFunctions.php +++ b/libs/myFunctions.php @@ -483,7 +483,7 @@ private function getPowerSumOfLog(int $logId, int $startTime, int $endTime, int // Zu viele Logwerte in der TimeRange vorhanden elseif (10000 <= count($buffer)) { - $intervallEdge = $startTime + ($endTime - $startTime) / 2; + $intervallEdge = (int)($startTime + ($endTime - $startTime) / 2); $bufferSum = $this->getPowerSumOfLog($logId, $startTime, $intervallEdge, $mode) + $this->getPowerSumOfLog($logId, $intervallEdge, $endTime, $mode); } // Logwerte vorhanden