X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FIEUrlExtension.php;h=16163fb3041df812cbe0d8438e124cc9f090be64;hb=b225a84ff95badf1e407c3952e1e0c540507a8e8;hp=216d9b78604c6c8802f63cf52ddc53c57162e7e2;hpb=970c99e5dd34457704dae2ed14d214374693a1d4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/IEUrlExtension.php b/includes/libs/IEUrlExtension.php index 216d9b7860..16163fb304 100644 --- a/includes/libs/IEUrlExtension.php +++ b/includes/libs/IEUrlExtension.php @@ -59,7 +59,7 @@ class IEUrlExtension { * @param array $extWhitelist Extensions which are allowed, assumed harmless. * @return bool */ - public static function areServerVarsBad( $vars, $extWhitelist = array() ) { + public static function areServerVarsBad( $vars, $extWhitelist = [] ) { // Check QUERY_STRING or REQUEST_URI if ( isset( $vars['SERVER_SOFTWARE'] ) && isset( $vars['REQUEST_URI'] ) @@ -97,7 +97,7 @@ class IEUrlExtension { * URL, and which should be allowed. * @return bool */ - public static function isUrlExtensionBad( $urlPart, $extWhitelist = array() ) { + public static function isUrlExtensionBad( $urlPart, $extWhitelist = [] ) { if ( strval( $urlPart ) === '' ) { return false; } @@ -108,7 +108,7 @@ class IEUrlExtension { return false; } - if ( in_array( $extension, array( 'php', 'php5' ) ) ) { + if ( in_array( $extension, [ 'php', 'php5' ] ) ) { // Script extension, OK return false; } @@ -137,7 +137,7 @@ class IEUrlExtension { * @param $extWhitelist array * @return bool|string */ - public static function fixUrlForIE6( $url, $extWhitelist = array() ) { + public static function fixUrlForIE6( $url, $extWhitelist = [] ) { $questionPos = strpos( $url, '?' ); if ( $questionPos === false ) { $beforeQuery = $url . '?'; @@ -256,10 +256,10 @@ class IEUrlExtension { * */ public static function haveUndecodedRequestUri( $serverSoftware ) { - static $whitelist = array( + static $whitelist = [ 'Apache', 'Zeus', - 'LiteSpeed' ); + 'LiteSpeed' ]; if ( preg_match( '/^(.*?)($|\/| )/', $serverSoftware, $m ) ) { return in_array( $m[1], $whitelist ); } else {