RemoteFilesystem: fix result length check (#10656)
parent
f459b9bf61
commit
37627f10d0
|
@ -526,7 +526,7 @@ class RemoteFilesystem
|
||||||
} catch (\Throwable $e) {
|
} 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');
|
throw new MaxFileSizeExceededException('Maximum allowed download size reached. Downloaded ' . Platform::strlen($result) . ' of allowed ' . $maxFileSize . ' bytes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue