X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStreamFile.php;h=8d0b8f17275f8ea28ff99d578f487f6c5d526339;hb=41fdde6e811ff3aaf12ad334bb0dee0e2e41b373;hp=bac4db65fba719280d829be2e10fd342c00161d4;hpb=e94f7ef8e79aeceb867fcae2e29fc4a7b2d9cf1d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/StreamFile.php b/includes/StreamFile.php index bac4db65fb..8d0b8f1727 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -38,7 +38,7 @@ class StreamFile { * @throws MWException * @return bool Success */ - public static function stream( $fname, $headers = array(), $sendErrors = true ) { + public static function stream( $fname, $headers = [], $sendErrors = true ) { if ( FileBackend::isStoragePath( $fname ) ) { // sanity throw new MWException( __FUNCTION__ . " given storage path '$fname'." ); @@ -74,11 +74,11 @@ class StreamFile { * @return int|bool READY_STREAM, NOT_MODIFIED, or false on failure */ public static function prepareForStream( - $path, $info, $headers = array(), $sendErrors = true + $path, $info, $headers = [], $sendErrors = true ) { if ( !is_array( $info ) ) { if ( $sendErrors ) { - HttpStatus::header( 404 ); + HttpStatus::header( 404 ); header( 'Cache-Control: no-cache' ); header( 'Content-Type: text/html; charset=utf-8' ); $encFile = htmlspecialchars( $path );