r81827 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81826‎ | r81827 | r81828 >
Date:17:05, 9 February 2011
Author:ialex
Status:ok
Tags:
Comment:
Fix for r81675: Skin::getTitle() will return null when $wgTitle is null and $wgOut->setTitle() not called, resulting in the following when passing a non-null parameter to User::getSkin():
Catchable fatal error: Argument 1 passed to Title::equals() must be an instance of Title, null given, called in includes/User.php on line 2255 and defined in includes/Title.php on line 3689
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -2255,7 +2255,7 @@
22562256 $this->mSkin = $this->createSkinObject();
22572257 $this->mSkin->setTitle( $wgOut->getTitle() );
22582258 }
2259 - if ( $t && !$t->equals( $this->mSkin->getTitle() ) ) {
 2259+ if ( $t && ( !$this->mSkin->getTitle() || !$t->equals( $this->mSkin->getTitle() ) ) ) {
22602260 $skin = $this->createSkinObject();
22612261 $skin->setTitle( $t );
22622262 return $skin;

Follow-up revisions

RevisionCommit summaryAuthorDate
r81873MFT: r81827, fixes total breakage of the installertstarling02:50, 10 February 2011
r82222MFT r81827demon07:34, 16 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81675Cleanup to r70900, r72481: don't construct new skin objects just because the ...demon01:08, 8 February 2011

Status & tagging log