fix SeekableHttpStream::stream_stat errors on failed open

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/44509/head
Robin Appelman 11 months ago
parent 1f405a80b4
commit f0e5ed3681
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB

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

Loading…
Cancel
Save