Skip to content

Commit e00e604

Browse files
committed
Fix comparison between int and float
1 parent c890b27 commit e00e604

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FileEncrypter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function encrypt($sourcePath, $destPath)
101101
// In this scenario, request the chunk again
102102
if (
103103
($i + 1 < $numberOfChunks && strlen($plaintext) !== $chunkSize)
104-
|| ($i + 1 === $numberOfChunks && $fileSize !== strlen($plaintext) + $chunkSize * $i)
104+
|| ($i + 1 == $numberOfChunks && $fileSize !== strlen($plaintext) + $chunkSize * $i)
105105
) {
106106
fseek($fpIn, $chunkSize * $i);
107107
continue;
@@ -152,7 +152,7 @@ public function decrypt($sourcePath, $destPath)
152152
// In this scenario, request the chunk again
153153
if (
154154
($i + 1 < $numberOfChunks && strlen($ciphertext) !== $chunkSize)
155-
|| ($i + 1 === $numberOfChunks && $fileSize !== strlen($ciphertext) + $chunkSize * $i)
155+
|| ($i + 1 == $numberOfChunks && $fileSize !== strlen($ciphertext) + $chunkSize * $i)
156156
) {
157157
fseek($fpIn, 16 + 16 * (self::FILE_ENCRYPTION_BLOCKS + 1) * $i);
158158
continue;

0 commit comments

Comments
 (0)