fix SeekableHttpStream::stream_stat errors on failed open

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2023-07-13 15:38:58 +02:00
parent 7c9edbff32
commit b0e663fa28
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -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;