From: Raimond Spekking Date: Thu, 15 Oct 2009 07:08:56 +0000 (+0000) Subject: Fix PHP Notice: Undefined variable: text in /var/www/w/includes/Export.php on line... X-Git-Tag: 1.31.0-rc.0~39279 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=9509e98ebb4883222e4bb4cfa60a9169ad9f6e38;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/Export.php b/includes/Export.php index dd58d4b869..61847ac486 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -500,6 +500,7 @@ class XmlDumpWriter { $out .= " " . Xml::elementClean( 'comment', null, strval( $row->rev_comment ) ) . "\n"; } + $text = ''; if( $row->rev_deleted & Revision::DELETED_TEXT ) { $out .= " " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n"; } elseif( isset( $row->old_text ) ) { @@ -514,7 +515,7 @@ class XmlDumpWriter { array( 'id' => $row->rev_text_id ), "" ) . "\n"; } - + wfRunHooks( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) ); $out .= " \n";