X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=blobdiff_plain;f=includes%2Fupload%2FUploadBase.php;h=5352d95b8de97338efd26024388aaa36c2b57b38;hb=6e956d55aac4e4d7e6145ed51c44311ca0e9b0c7;hp=064ca6728c0ce8a86d385c88b62289c32e3d9894;hpb=39f0f919c5708f4c672a8eb7e0891f50bf16883e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 064ca6728c..5352d95b8d 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -854,7 +854,7 @@ abstract class UploadBase { if ( !is_array( $error ) ) { $error = [ $error ]; } - return call_user_func_array( 'Status::newFatal', $error ); + return Status::newFatal( ...$error ); } $status = $this->getLocalFile()->upload( @@ -1063,7 +1063,7 @@ abstract class UploadBase { if ( !$isPartial ) { $error = $this->runUploadStashFileHook( $user ); if ( $error ) { - return call_user_func_array( 'Status::newFatal', $error ); + return Status::newFatal( ...$error ); } } try { @@ -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 ) ) { @@ -1864,8 +1864,7 @@ abstract class UploadBase { # look up scanner configuration $command = $wgAntivirusSetup[$wgAntivirus]['command']; $exitCodeMap = $wgAntivirusSetup[$wgAntivirus]['codemap']; - $msgPattern = isset( $wgAntivirusSetup[$wgAntivirus]['messagepattern'] ) ? - $wgAntivirusSetup[$wgAntivirus]['messagepattern'] : null; + $msgPattern = $wgAntivirusSetup[$wgAntivirus]['messagepattern'] ?? null; if ( strpos( $command, "%f" ) === false ) { # simple pattern: append file to scan