From 84b12ed8150b0a04c52b33f43fd94c4ac503d0e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 4 Jan 2012 06:52:59 +0000 Subject: [PATCH] * 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 --- includes/EditPage.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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. -- 2.20.1