StringUtils: Clarify that isValidRegex is for PCRE regexps
[lhc/web/wiklou.git] / includes / export / XmlDumpWriter.php
index f34b3bd..e697ef2 100644 (file)
@@ -310,7 +310,8 @@ class XmlDumpWriter {
                } 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 {
@@ -657,6 +658,8 @@ class XmlDumpWriter {
         */
        function writeUpload( $file, $dumpContents = false ) {
                if ( $file->isOld() ) {
+                       /** @var OldLocalFile $file */
+                       '@phan-var OldLocalFile $file';
                        $archiveName = "      " .
                                Xml::element( 'archivename', null, $file->getArchiveName() ) . "\n";
                } else {