Index: trunk/extensions/LiquidThreads/classes/DeletionController.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | $title = $article->getTitle(); |
9 | 9 | |
10 | 10 | if ($title->getNamespace() != NS_LQT_THREAD) { |
11 | | - return; |
| 11 | + return true; |
12 | 12 | } |
13 | 13 | |
14 | 14 | $threads = Threads::where( array( 'thread_root' => $id ) ); |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | static function onArticleDelete( &$article, &$user, &$reason, &$error ) { |
36 | 36 | $thread = Threads::withRoot( $article ); |
37 | 37 | |
38 | | - if ($thread->isTopmostThread() && count($thread->replies())) { |
| 38 | + if ( is_object( $thread ) && $thread->isTopmostThread() && count($thread->replies())) { |
39 | 39 | $error = wfMsgExt( 'lqt-delete-has-subthreads', 'parse' ); |
40 | 40 | return false; |
41 | 41 | } |