summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-07-13 15:38:58 +0200
committerRobin Appelman <robin@icewind.nl>2024-03-27 17:11:22 +0100
commite5f373c2721e16c2fdd8da2a2d25968174735434 (patch)
tree0772acb82544d701938d24dace2ad548f4019f5f /lib
parent24a4fc050f758c1e3282fb88d402ae6f517b5c1c (diff)
downloadnextcloud-server-e5f373c2721e16c2fdd8da2a2d25968174735434.tar.gz
nextcloud-server-e5f373c2721e16c2fdd8da2a2d25968174735434.zip
fix SeekableHttpStream::stream_stat errors on failed open
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Stream/SeekableHttpStream.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php
index 51ccaeba998..66f94768e62 100644
--- a/lib/private/Files/Stream/SeekableHttpStream.php
+++ b/lib/private/Files/Stream/SeekableHttpStream.php
@@ -219,7 +219,9 @@ class SeekableHttpStream implements File {
public function stream_stat() {
if ($this->getCurrent()) {
$stat = fstat($this->getCurrent());
- $stat['size'] = $this->totalSize;
+ if ($stat) {
+ $stat['size'] = $this->totalSize;
+ }
return $stat;
} else {
return false;