Browse Source
Merge pull request #22289 from nextcloud/techdebt/noid/fix-encryption-stream-invalid-scalar-arguments
Cast float to int to avoid invalid scalar argument warning
pull/22311/head
Morris Jobke
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
1 additions and
6 deletions
-
build/psalm-baseline.xml
-
lib/private/Files/Stream/Encryption.php
|
|
@ -4849,11 +4849,6 @@ |
|
|
|
</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> |
|
|
|
|
|
@ -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(); |
|
|
|