$out .= " <sha1/>\n";
}
- Hooks::run( 'XmlDumpWriterWriteRevision', [ &$this, &$out, $row, $text ] );
+ // Avoid PHP 7.1 warning from passing $this by reference
+ $writer = $this;
+ Hooks::run( 'XmlDumpWriterWriteRevision', [ &$writer, &$out, $row, $text ] );
$out .= " </revision>\n";
global $wgContLang;
$prefix = $wgContLang->getFormattedNsText( $title->getNamespace() );
+ // @todo Emit some kind of warning to the user if $title->getNamespace() !==
+ // NS_MAIN and $prefix === '' (viz. pages in an unregistered namespace)
+
if ( $prefix !== '' ) {
$prefix .= ':';
}