Disable $wgServer autodetection to prevent cache poisoning attacks
[lhc/web/wiklou.git] / includes / utils / MWFileProps.php
index 9d05c6a..19a3ce5 100644 (file)
@@ -26,7 +26,7 @@
  * @since 1.28
  */
 class MWFileProps {
-       /** @var MimeMagic */
+       /** @var MimeAnalyzer */
        private $magic;
 
        /**
@@ -104,11 +104,7 @@ class MWFileProps {
                # NOTE: $gis[2] contains a code for the image type. This is no longer used.
                $info['width'] = $gis[0];
                $info['height'] = $gis[1];
-               if ( isset( $gis['bits'] ) ) {
-                       $info['bits'] = $gis['bits'];
-               } else {
-                       $info['bits'] = 0;
-               }
+               $info['bits'] = $gis['bits'] ?? 0;
 
                return $info;
        }