Index: branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/Hooks.php |
— | — | @@ -177,8 +177,13 @@ |
178 | 178 | $attribs = array(); |
179 | 179 | $attribs['ThreadSubject'] = $thread->subject(); |
180 | 180 | if ( $thread->hasSuperThread() ) { |
181 | | - $attribs['ThreadParent'] = $thread->superThread()->title()->getPrefixedText(); |
182 | | - $attribs['ThreadAncestor'] = $thread->topmostThread()->title()->getPrefixedText(); |
| 181 | + # HACK: This was throwing fatals during XML dumps on the cluster |
| 182 | + if ( $thread->superThread() && $thread->superThread()->title() ) { |
| 183 | + $attribs['ThreadParent'] = $thread->superThread()->title()->getPrefixedText(); |
| 184 | + } |
| 185 | + if ( $thread->topmostThread() && $thread->topmostThread()->title() ) { |
| 186 | + $attribs['ThreadAncestor'] = $thread->topmostThread()->title()->getPrefixedText(); |
| 187 | + } |
183 | 188 | } |
184 | 189 | $attribs['ThreadPage'] = $thread->getTitle()->getPrefixedText(); |
185 | 190 | $attribs['ThreadID'] = $thread->id(); |
— | — | @@ -226,6 +231,11 @@ |
227 | 232 | } |
228 | 233 | |
229 | 234 | $thread = Threads::withRoot( new Article( $title ) ); |
| 235 | + # HACK: The following lines were throwing fatals on the cluster |
| 236 | + if ( !$thread ) { |
| 237 | + return true; |
| 238 | + } |
| 239 | + |
230 | 240 | $text = $thread->subject(); |
231 | 241 | |
232 | 242 | $title = clone $thread->topmostThread()->title(); |