r89869 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89868‎ | r89869 | r89870 >
Date:07:02, 11 June 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Changed more magic __get method calls to accessors, were throwing notices
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -511,7 +511,7 @@
512512 function getCategoryLinks() {
513513 global $wgUseCategoryBrowser, $wgContLang;
514514
515 - $out = $this->getContext()->output;
 515+ $out = $this->getContext()->getOutput();
516516
517517 if ( count( $out->mCategoryLinks ) == 0 ) {
518518 return '';
@@ -601,7 +601,7 @@
602602 }
603603
604604 function getCategories() {
605 - $out = $this->getContext()->output;
 605+ $out = $this->getContext()->getOutput();
606606
607607 $catlinks = $this->getCategoryLinks();
608608

Comments

#Comment by DaSch (talk | contribs)   10:18, 1 July 2011

Is this correctly tested? in my Installation updating to this revision it gives me Fatal error: Cannot access private property RequestContext::$output in /…/includes/Skin.php on line 611

#Comment by IAlex (talk | contribs)   10:39, 1 July 2011

You should have a problem in your working copy, because that revision removed the call to the property. Actually at the time of the revision this was not a property, but a call to the magic __get() method of the RequestContext object, this was changed back to the property itself in r90899.

Also in this exact revision, line 611 of Skin.php is $allCats = $out->getCategoryLinks();.

Status & tagging log