filerepo: fix return type of FileRepo::streamFileWithStatus()
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 20 Apr 2019 03:13:49 +0000 (20:13 -0700)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 20 Apr 2019 07:12:38 +0000 (07:12 +0000)
Change-Id: Ibb4610630203e22d921189699f6c51298212d5d3

includes/media/MediaTransformOutput.php

index 9c06ef4..463a794 100644 (file)
@@ -202,7 +202,8 @@ abstract class MediaTransformOutput {
                        return Status::newFatal( 'backend-fail-stream', '<no path>' );
                } elseif ( FileBackend::isStoragePath( $this->path ) ) {
                        $be = $this->file->getRepo()->getBackend();
-                       return $be->streamFile( [ 'src' => $this->path, 'headers' => $headers ] );
+                       return Status::wrap(
+                               $be->streamFile( [ 'src' => $this->path, 'headers' => $headers ] ) );
                } else { // FS-file
                        $success = StreamFile::stream( $this->getLocalCopyPath(), $headers );
                        return $success ? Status::newGood() : Status::newFatal( 'backend-fail-stream', $this->path );