Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -368,9 +368,13 @@ |
369 | 369 | * of for every row. |
370 | 370 | */ |
371 | 371 | static function storeApprovedRevisionForHistoryPage( &$article ) { |
| 372 | + // A bug in some versions of MW 1.19 causes $article to be null. |
| 373 | + if ( is_null( $article ) ) { |
| 374 | + return true; |
| 375 | + } |
372 | 376 | // this will be null if there's no ID |
373 | 377 | $approvedRevID = ApprovedRevs::getApprovedRevID( $article->getTitle() ); |
374 | | - $article->approvedRevID = $approvedRevID; |
| 378 | + $article->getTitle()->approvedRevID = $approvedRevID; |
375 | 379 | // also load extension messages, while we're at it |
376 | 380 | ApprovedRevs::loadMessages(); |
377 | 381 | return true; |
— | — | @@ -392,7 +396,7 @@ |
393 | 397 | $article = $historyPage->getArticle(); |
394 | 398 | // use the rev ID field in the $article object, which was |
395 | 399 | // stored earlier |
396 | | - $approvedRevID = $article->approvedRevID; |
| 400 | + $approvedRevID = $title->approvedRevID; |
397 | 401 | if ( $row->rev_id == $approvedRevID ) { |
398 | 402 | $s .= '★ '; |
399 | 403 | } |