Index: branches/wmf/1.17wmf1/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -883,11 +883,13 @@ |
884 | 884 | $firstpage = $links[1][0]; |
885 | 885 | } |
886 | 886 | $firstpage_title = Title::newFromText( "$page_namespace:$firstpage" ); |
887 | | - $parser->getOutput()->addTemplate( |
888 | | - $firstpage_title, |
889 | | - $firstpage_title->getArticleID(), |
890 | | - $firstpage_title->getLatestRevID() |
891 | | - ); |
| 887 | + if ( $firstpage_title ) { |
| 888 | + $parser->getOutput()->addTemplate( |
| 889 | + $firstpage_title, |
| 890 | + $firstpage_title->getArticleID(), |
| 891 | + $firstpage_title->getLatestRevID() |
| 892 | + ); |
| 893 | + } |
892 | 894 | } |
893 | 895 | |
894 | 896 | if( $header ) { |