Skip to content

Commit

Permalink
fix: cast to int
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Richards <[email protected]>
  • Loading branch information
joshtrichards committed Jan 19, 2025
1 parent 1ba811e commit c0579bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


class UpdateException extends \Exception {

/** @param list<string> $data */
Expand Down Expand Up @@ -649,7 +650,7 @@ public function downloadUpdate(): void {
} else {
// download succeeded
$info = curl_getinfo($ch);
$this->silentLog("[info] download stats: size=" . $this->formatBytes($info['size_download']) . " bytes; total_time=" . round($info['total_time'], 2) . " secs; avg speed=" . $this->formatBytes($info['speed_download']) . "/sec");
$this->silentLog("[info] download stats: size=" . $this->formatBytes((int)$info['size_download']) . " bytes; total_time=" . round($info['total_time'], 2) . " secs; avg speed=" . $this->formatBytes((int)$info['speed_download']) . "/sec");
}

curl_close($ch);
Expand Down
2 changes: 1 addition & 1 deletion lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ public function downloadUpdate(): void {
} else {
// download succeeded
$info = curl_getinfo($ch);
$this->silentLog("[info] download stats: size=" . $this->formatBytes($info['size_download']) . " bytes; total_time=" . round($info['total_time'], 2) . " secs; avg speed=" . $this->formatBytes($info['speed_download']) . "/sec");
$this->silentLog("[info] download stats: size=" . $this->formatBytes((int)$info['size_download']) . " bytes; total_time=" . round($info['total_time'], 2) . " secs; avg speed=" . $this->formatBytes((int)$info['speed_download']) . "/sec");
}

curl_close($ch);
Expand Down
Binary file modified updater.phar
Binary file not shown.

0 comments on commit c0579bd

Please sign in to comment.