X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Ffilebackend%2FHTTPFileStreamer.php;h=e1612546d62b2e5c9a06eb4c091b0400af063ed7;hb=9cbb8f104d66b9b1a5497e12cd931a3827f6b5b3;hp=9f8959cba0b4e4398b6aaed10f87bf822c1ca028;hpb=e46d0694ac253df5f91fcfcd65ff19b0b3a2982c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/filebackend/HTTPFileStreamer.php b/includes/libs/filebackend/HTTPFileStreamer.php index 9f8959cba0..e1612546d6 100644 --- a/includes/libs/filebackend/HTTPFileStreamer.php +++ b/includes/libs/filebackend/HTTPFileStreamer.php @@ -47,12 +47,8 @@ class HTTPFileStreamer { */ public function __construct( $path, array $params = [] ) { $this->path = $path; - $this->obResetFunc = isset( $params['obResetFunc'] ) - ? $params['obResetFunc'] - : [ __CLASS__, 'resetOutputBuffers' ]; - $this->streamMimeFunc = isset( $params['streamMimeFunc'] ) - ? $params['streamMimeFunc'] - : [ __CLASS__, 'contentTypeFromPath' ]; + $this->obResetFunc = $params['obResetFunc'] ?? [ __CLASS__, 'resetOutputBuffers' ]; + $this->streamMimeFunc = $params['streamMimeFunc'] ?? [ __CLASS__, 'contentTypeFromPath' ]; } /** @@ -64,7 +60,6 @@ class HTTPFileStreamer { * @param bool $sendErrors Send error messages if errors occur (like 404) * @param array $optHeaders HTTP request header map (e.g. "range") (use lowercase keys) * @param int $flags Bitfield of STREAM_* constants - * @throws MWException * @return bool Success */ public function stream(