From: Niklas Laxström Date: Wed, 4 Jan 2012 06:52:59 +0000 (+0000) Subject: * Add typehint to debug Call to a member function getTitle() on a non-object in ... X-Git-Tag: 1.31.0-rc.0~25563 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=84b12ed8150b0a04c52b33f43fd94c4ac503d0e2;p=lhc%2Fweb%2Fwiklou.git * Add typehint to debug Call to a member function getTitle() on a non-object in /www/w/includes/EditPage.php on line 121 * Remove @todo from constructor, because it's a constructor * Some typos and code style --- diff --git a/includes/EditPage.php b/includes/EditPage.php index c895048dac..487f2e885f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -113,10 +113,9 @@ class EditPage { public $suppressIntro = false; /** - * @todo document * @param $article Article */ - public function __construct( $article ) { + public function __construct( Article $article ) { $this->mArticle = $article; $this->mTitle = $article->getTitle(); } @@ -235,7 +234,7 @@ class EditPage { return; } - $wgOut->addModules( array( 'mediawiki.action.edit' ) ); + $wgOut->addModules( 'mediawiki.action.edit' ); if ( $wgUser->getOption( 'uselivepreview', false ) ) { $wgOut->addModules( 'mediawiki.legacy.preview' ); @@ -346,7 +345,7 @@ class EditPage { /** * Display a permissions error page, like OutputPage::showPermissionsErrorPage(), * but with the following differences: - * - If redlink=1, the user will be redirect to the page + * - If redlink=1, the user will be redirected to the page * - If there is content to display or the error occurs while either saving, * previewing or showing the difference, it will be a * "View source for ..." page displaying the source code after the error message.