From ebcd89f35bac04080b8907f3a971b6b885dad84b Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 9 Feb 2011 17:05:52 +0000 Subject: [PATCH] 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 --- includes/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index 46d6f42db3..90875cbaa5 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2255,7 +2255,7 @@ class User { $this->mSkin = $this->createSkinObject(); $this->mSkin->setTitle( $wgOut->getTitle() ); } - if ( $t && !$t->equals( $this->mSkin->getTitle() ) ) { + if ( $t && ( !$this->mSkin->getTitle() || !$t->equals( $this->mSkin->getTitle() ) ) ) { $skin = $this->createSkinObject(); $skin->setTitle( $t ); return $skin; -- 2.20.1