From: Ariel T. Glenn Date: Mon, 27 May 2019 13:03:29 +0000 (+0300) Subject: make sure revision uids are 0 in the xml if missing/0 in the db X-Git-Tag: 1.34.0-rc.0~1534^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=e8805741ed75a6f1fec01bc39962af75e6111c1c;p=lhc%2Fweb%2Fwiklou.git make sure revision uids are 0 in the xml if missing/0 in the db Bug: T224221 Change-Id: Id9861866fd9e4d2fe8d151c9631403aa24b9a779 --- diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php index 39153cf7c0..d3fd374a37 100644 --- a/includes/export/XmlDumpWriter.php +++ b/includes/export/XmlDumpWriter.php @@ -252,7 +252,8 @@ class XmlDumpWriter { if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_USER ) ) { $out .= " " . Xml::element( 'contributor', [ 'deleted' => 'deleted' ] ) . "\n"; } else { - $out .= $this->writeContributor( $row->rev_user, $row->rev_user_text ); + // empty values get written out as uid 0, see T224221 + $out .= $this->writeContributor( $row->rev_user ?: 0, $row->rev_user_text ); } if ( isset( $row->rev_minor_edit ) && $row->rev_minor_edit ) {