]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cast float to int to avoid invalid scalar argument warning 22289/head
authorMorris Jobke <hey@morrisjobke.de>
Tue, 18 Aug 2020 14:56:36 +0000 (16:56 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 18 Aug 2020 14:56:36 +0000 (16:56 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
build/psalm-baseline.xml
lib/private/Files/Stream/Encryption.php

index 5a2d3ab43bf160b8647e83f0c7cf333add80439a..a2e8eb89214782ee541217df3e34aa91e9058fce 100644 (file)
     </InvalidReturnType>
   </file>
   <file src="lib/private/Files/Stream/Encryption.php">
-    <InvalidScalarArgument occurrences="3">
-      <code>$newFilePosition</code>
-      <code>$newFilePosition</code>
-      <code>$position</code>
-    </InvalidScalarArgument>
     <UndefinedInterfaceMethod occurrences="1">
       <code>$cacheEntry</code>
     </UndefinedInterfaceMethod>
index 1fc14daacbdaf44f91695da4f7ee96a1f835536a..980be6d043e6cc3a436e5de03e8068813a11f07a 100644 (file)
@@ -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();