if ( !is_array( $error ) ) {
$error = [ $error ];
}
- return call_user_func_array( 'Status::newFatal', $error );
+ return Status::newFatal( ...$error );
}
$status = $this->getLocalFile()->upload(
if ( !$isPartial ) {
$error = $this->runUploadStashFileHook( $user );
if ( $error ) {
- return call_user_func_array( 'Status::newFatal', $error );
+ return Status::newFatal( ...$error );
}
}
try {
*/
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 ) ) {
# 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