RemoteFilesystem: fix result length check (#10656)

main
Stephan 2 years ago committed by GitHub
parent f459b9bf61
commit 37627f10d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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');
}

Loading…
Cancel
Save