Merge "ApiBase: Always validate that 'limit' is numeric"
[lhc/web/wiklou.git] / 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 );