self::WINDOWS_NONASCII_FILENAME => 'windows-nonascii-filename',
self::FILENAME_TOO_LONG => 'filename-toolong',
];
- if ( isset( $code_to_status[$error] ) ) {
- return $code_to_status[$error];
- }
-
- return 'unknown-error';
+ return $code_to_status[$error] ?? 'unknown-error';
}
/**
}
foreach ( $tags as $tag ) {
- if ( false !== strpos( $chunk, $tag ) ) {
+ if ( strpos( $chunk, $tag ) !== false ) {
wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
return true;