From 9509e98ebb4883222e4bb4cfa60a9169ad9f6e38 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 15 Oct 2009 07:08:56 +0000 Subject: [PATCH] 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. --- includes/Export.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; -- 2.20.1