From: Morris Jobke Date: Tue, 18 Aug 2020 14:56:36 +0000 (+0200) Subject: Cast float to int to avoid invalid scalar argument warning X-Git-Tag: v20.0.0beta1~34^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F22289%2Fhead;p=nextcloud-server.git Cast float to int to avoid invalid scalar argument warning Signed-off-by: Morris Jobke --- diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 5a2d3ab43bf..a2e8eb89214 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -4836,11 +4836,6 @@ - - $newFilePosition - $newFilePosition - $position - $cacheEntry diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index 1fc14daacbd..980be6d043e 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -416,7 +416,7 @@ class Encryption extends Wrapper { return $return; } - $newFilePosition = floor($newPosition / $this->unencryptedBlockSize) + $newFilePosition = (int)floor($newPosition / $this->unencryptedBlockSize) * $this->util->getBlockSize() + $this->headerSize; $oldFilePosition = parent::stream_tell();