From b0e663fa2842e61414b315d5ebc34cfe595168ec Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 13 Jul 2023 15:38:58 +0200 Subject: [PATCH] fix SeekableHttpStream::stream_stat errors on failed open Signed-off-by: Robin Appelman --- lib/private/Files/Stream/SeekableHttpStream.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php index 51ccaeba998cb..66f94768e624f 100644 --- a/lib/private/Files/Stream/SeekableHttpStream.php +++ b/lib/private/Files/Stream/SeekableHttpStream.php @@ -219,7 +219,9 @@ public function stream_tell() { 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;