From: Brion Vibber Date: Fri, 28 Dec 2007 07:03:28 +0000 (+0000) Subject: Work around regression in r28524: spewed PHP warnings due to mystery parameter added... X-Git-Tag: 1.31.0-rc.0~50247 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=443b29d0f2eaa5c1f37248e415a1721e988283b4;p=lhc%2Fweb%2Fwiklou.git Work around regression in r28524: spewed PHP warnings due to mystery parameter added to a QueryPage subclass's constructor. Made it optional so updateSpecialPages.php doesn't barf when going through the list. --- diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index e847dddc0a..63e218a6ef 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -23,14 +23,14 @@ class NewPagesPage extends QueryPage { protected $nondefaults = array(); protected $specialPage; - public function __construct( $specialPage ) { + public function __construct( $specialPage=null ) { $this->specialPage = $specialPage; } public function execute( $par ) { global $wgRequest, $wgLang; - $shownavigation = !$this->specialPage->including(); + $shownavigation = is_object( $this->specialPage ) && !$this->specialPage->including(); $defaults = array( /* bool */ 'hideliu' => false,