Use https://www.php.net/ instead of https://secure.php.net/
[lhc/web/wiklou.git] / includes / libs / filebackend / HTTPFileStreamer.php
index 9f8959c..e161254 100644 (file)
@@ -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(