} catch ( SuppressedDataException $ex ) {
return null;
} catch ( Exception $ex ) {
- if ( $ex instanceof MWException || $ex instanceof RuntimeException ) {
+ if ( $ex instanceof MWException || $ex instanceof RuntimeException ||
+ $ex instanceof InvalidArgumentException ) {
MWDebug::warning( $warning . ': ' . $ex->getMessage() );
return null;
} else {
*/
function writeUpload( $file, $dumpContents = false ) {
if ( $file->isOld() ) {
+ /** @var OldLocalFile $file */
+ '@phan-var OldLocalFile $file';
$archiveName = " " .
Xml::element( 'archivename', null, $file->getArchiveName() ) . "\n";
} else {