http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97906

Revision: 97906
Author:   werdna
Date:     2011-09-23 11:42:34 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Some error handling

Modified Paths:
--------------
    trunk/extensions/LiquidThreads/classes/Hooks.php
    trunk/extensions/LiquidThreads/classes/ParserFunctions.php

Modified: trunk/extensions/LiquidThreads/classes/Hooks.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Hooks.php    2011-09-23 11:39:25 UTC 
(rev 97905)
+++ trunk/extensions/LiquidThreads/classes/Hooks.php    2011-09-23 11:42:34 UTC 
(rev 97906)
@@ -171,7 +171,7 @@
 
        static function dumpThreadData( $writer, &$out, $row, $title ) {
                // Is it a thread
-               if ( empty( $row->thread_id ) ) {
+               if ( empty( $row->thread_id ) || $row->thread_type >= 2 ) {
                        return true;
                }
 

Modified: trunk/extensions/LiquidThreads/classes/ParserFunctions.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/ParserFunctions.php  2011-09-23 
11:39:25 UTC (rev 97905)
+++ trunk/extensions/LiquidThreads/classes/ParserFunctions.php  2011-09-23 
11:42:34 UTC (rev 97906)
@@ -161,6 +161,10 @@
                foreach( $pout->mLqtReplacements as $text => $details ) {
                        $result = '';
                        
+                       if ( ! is_array($details) ) {
+                               continue;
+                       }
+                       
                        if ( $details['type'] == 'talkpage' ) {
                                $result = self::runLqtTalkPage( $details );
                        } elseif ( $details['type'] == 'thread' ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to