Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+
[lhc/web/wiklou.git] / includes / upload / UploadBase.php
index 064ca67..ae59164 100644 (file)
@@ -1397,7 +1397,7 @@ abstract class UploadBase {
         */
        public static function checkXMLEncodingMissmatch( $file ) {
                global $wgSVGMetadataCutoff;
-               $contents = file_get_contents( $file, false, null, -1, $wgSVGMetadataCutoff );
+               $contents = file_get_contents( $file, false, null, 0, $wgSVGMetadataCutoff );
                $encodingRegex = '!encoding[ \t\n\r]*=[ \t\n\r]*[\'"](.*?)[\'"]!si';
 
                if ( preg_match( "!<\?xml\b(.*?)\?>!si", $contents, $matches ) ) {