From 75e2431560cd824efd80196c03da2703c0df7048 Mon Sep 17 00:00:00 2001 From: EWouters <6179932+EWouters@users.noreply.github.com> Date: Sun, 1 Jan 2023 22:07:42 +0100 Subject: [PATCH] [Fix]: scan-app-data conversion Adapted from sugestions by @Hiyoal in #34283 and @st3iny in #35935. See https://github.com/nextcloud/server/issues/34283#issuecomment-1288075064 and https://github.com/nextcloud/server/pull/35935#discussion_r1059905594. Closes #34283. Co-authored-by: Richard Steinmetz Signed-off-by: EWouters <6179932+EWouters@users.noreply.github.com> --- apps/files/lib/Command/ScanAppData.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/lib/Command/ScanAppData.php b/apps/files/lib/Command/ScanAppData.php index a5e9d99f8044a..63e13733b2a4d 100644 --- a/apps/files/lib/Command/ScanAppData.php +++ b/apps/files/lib/Command/ScanAppData.php @@ -9,6 +9,7 @@ * @author Joel S * @author Morris Jobke * @author Roeland Jago Douma + * @author Erik Wouters <6179932+EWouters@users.noreply.github.com> * * @license GNU AGPL version 3 or any later version * @@ -239,7 +240,7 @@ protected function showSummary($headers, $rows, OutputInterface $output) { protected function formatExecTime() { $secs = round($this->execTime); # convert seconds into HH:MM:SS form - return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60); + return sprintf('%02d:%02d:%02d', (int)($secs / 3600), ((int)($secs / 60) % 60), (int)$secs % 60); } protected function reconnectToDatabase(OutputInterface $output): Connection {