http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84501
Revision: 84501
Author: happy-melon
Date: 2011-03-21 23:47:29 +0000 (Mon, 21 Mar 2011)
Log Message:
-----------
'Fix' fatal in LiquidThreads from r84475. I say 'fixed' in the loosest
possible sense because I have absolutely no idea why that rev should have
triggered this error. Accessing-method-of-non-object errors seem to be an
ongoing bug in LQT (bug 17553), so I suspect that this was an edgecase waiting
to happen, and the changes in r84475 just shifted codeflow around in such a way
as to make it happen. All I've done here is make the
"$article->getTitle()->equals()" comparisons safely become false if $article is
null.
Modified Paths:
--------------
trunk/extensions/LiquidThreads/classes/Hooks.php
Modified: trunk/extensions/LiquidThreads/classes/Hooks.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Hooks.php 2011-03-21 23:28:54 UTC
(rev 84500)
+++ trunk/extensions/LiquidThreads/classes/Hooks.php 2011-03-21 23:47:29 UTC
(rev 84501)
@@ -417,10 +417,17 @@
self::$editThread->getTitle()->equals(
$talkPage ) );
$isOnTalkPage = $isOnTalkPage || ( self::$editAppliesTo
&&
self::$editAppliesTo->getTitle()->equals(
$talkPage ) );
- $isOnTalkPage = $isOnTalkPage ||
- ( self::$editArticle->getTitle()->equals(
$talkPage ) );
- if ( self::$editArticle->getTitle()->equals( $title )
&& $isOnTalkPage ) {
+ # FIXME: self::$editArticle is sometimes not set; is
that ok and if not why is it happening?
+ if( self::$editArticle instanceof Article ){
+ $isOnTalkPage = $isOnTalkPage ||
+ (
self::$editArticle->getTitle()->equals( $talkPage ) );
+ }
+
+ if ( self::$editArticle instanceof Article
+ && self::$editArticle->getTitle()->equals(
$title )
+ && $isOnTalkPage )
+ {
$isBlocked = false;
return true;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs