1
0
Fork 0

RemoteFilesystem: fix result length check (#10656)

pull/10669/head
Stephan 2022-03-26 13:42:57 +00:00 committed by GitHub
parent f459b9bf61
commit 37627f10d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ class RemoteFilesystem
} catch (\Throwable $e) {
}
if ($maxFileSize !== null && Platform::strlen($result) >= $maxFileSize) {
if ($result !== false && $maxFileSize !== null && Platform::strlen($result) >= $maxFileSize) {
throw new MaxFileSizeExceededException('Maximum allowed download size reached. Downloaded ' . Platform::strlen($result) . ' of allowed ' . $maxFileSize . ' bytes');
}