r57747 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57746‎ | r57747 | r57748 >
Date:07:08, 15 October 2009
Author:raymond
Status:ok
Tags:
Comment:
Fix PHP Notice: Undefined variable: text in /var/www/w/includes/Export.php on line 518 seen on translatewiki
Initialize $text to avoid this notice.
But I am unsure if this is enough. The variable $text seems unused for a long time until a hook, introduced in r53818, uses it.
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -500,6 +500,7 @@
501501 $out .= " " . Xml::elementClean( 'comment', null, strval( $row->rev_comment ) ) . "\n";
502502 }
503503
 504+ $text = '';
504505 if( $row->rev_deleted & Revision::DELETED_TEXT ) {
505506 $out .= " " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n";
506507 } elseif( isset( $row->old_text ) ) {
@@ -514,7 +515,7 @@
515516 array( 'id' => $row->rev_text_id ),
516517 "" ) . "\n";
517518 }
518 -
 519+
519520 wfRunHooks( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) );
520521
521522 $out .= " </revision>\n";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53818Incremental enabling changes to allow searching of LiquidThreads by page and ...werdna17:57, 27 July 2009

Status & tagging log