Run strval() over the File description
authorReedy <reedy@wikimedia.org>
Mon, 18 Sep 2017 00:00:07 +0000 (01:00 +0100)
committerReedy <reedy@wikimedia.org>
Mon, 18 Sep 2017 00:00:10 +0000 (01:00 +0100)
Bug: T176090
Change-Id: I8488666c221a1bd4e4e063291e74819a07a4a20f

includes/export/XmlDumpWriter.php

index 990f16d..c46eb61 100644 (file)
@@ -403,7 +403,7 @@ class XmlDumpWriter {
                if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
                        $comment = Xml::element( 'comment', [ 'deleted' => 'deleted' ] );
                } else {
-                       $comment = Xml::elementClean( 'comment', null, $file->getDescription() );
+                       $comment = Xml::elementClean( 'comment', null, strval( $file->getDescription() ) );
                }
                return "    <upload>\n" .
                        $this->writeTimestamp( $file->getTimestamp() ) .