From: Christian Aistleitner Date: Fri, 30 Mar 2012 21:01:06 +0000 (+0200) Subject: Stop PHP notices fouling up XML, when exporting all pages X-Git-Tag: 1.31.0-rc.0~24089^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=75b7b099758b43e84b96666c4c5bd991684cd4c1;p=lhc%2Fweb%2Fwiklou.git Stop PHP notices fouling up XML, when exporting all pages Change-Id: I330fd34daeb2ad82d8d8a63b0ef2cb11f52f1170 --- 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' );