mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #39510 from nextcloud/backport/39221/stable26
[stable26] Bugfix/bulk upload empty files
This commit is contained in:
commit
81d8d324e1
1 changed files with 6 additions and 2 deletions
|
|
@ -211,13 +211,17 @@ class MultipartRequestParser {
|
|||
throw new BadRequest("Computed md5 hash is incorrect.");
|
||||
}
|
||||
|
||||
$content = stream_get_line($this->stream, $length);
|
||||
if ($length === 0) {
|
||||
$content = '';
|
||||
} else {
|
||||
$content = stream_get_line($this->stream, $length);
|
||||
}
|
||||
|
||||
if ($content === false) {
|
||||
throw new Exception("Fail to read part's content.");
|
||||
}
|
||||
|
||||
if (feof($this->stream)) {
|
||||
if ($length !== 0 && feof($this->stream)) {
|
||||
throw new Exception("Unexpected EOF while reading stream.");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue