From 75b7b099758b43e84b96666c4c5bd991684cd4c1 Mon Sep 17 00:00:00 2001 From: Christian Aistleitner Date: Fri, 30 Mar 2012 23:01:06 +0200 Subject: [PATCH] Stop PHP notices fouling up XML, when exporting all pages Change-Id: I330fd34daeb2ad82d8d8a63b0ef2cb11f52f1170 --- includes/specials/SpecialExport.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 360d2d2460..b00eec8245 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -93,6 +93,13 @@ class SpecialExport extends SpecialPage { elseif( $request->getCheck( 'exportall' ) && $wgExportAllowAll ) { $this->doExport = true; $exportall = true; + + /* Although $page and $history are not used later on, we + nevertheless set them to avoid that PHP notices about using + undefined variables foul up our XML output (see call to + doExport(...) further down) */ + $page = ''; + $history = ''; } elseif( $request->wasPosted() && $par == '' ) { $page = $request->getText( 'pages' ); -- 2.20.1