r84870 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84869‎ | r84870 | r84871 >
Date:18:44, 27 March 2011
Author:reedy
Status:ok
Tags:
Comment:
<yannf> http://fr.wikisource.org/wiki/Rig_V%C3%A9da
<yannf> PHP fatal error in /usr/local/apache/common-local/php-1.17/extensions/ProofreadPage/ProofreadPage_body.php line 888:
<yannf> Call to a member function getArticleID() on a non-object


Check validity of title created
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php
@@ -877,11 +877,13 @@
878878 $firstpage = $links[1][0];
879879 }
880880 $firstpage_title = Title::newFromText( "$page_namespace:$firstpage" );
881 - $parser->getOutput()->addTemplate(
882 - $firstpage_title,
883 - $firstpage_title->getArticleID(),
884 - $firstpage_title->getLatestRevID()
885 - );
 881+ if ( $firstpage_title ) {
 882+ $parser->getOutput()->addTemplate(
 883+ $firstpage_title,
 884+ $firstpage_title->getArticleID(),
 885+ $firstpage_title->getLatestRevID()
 886+ );
 887+ }
886888 }
887889
888890 if( $header ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r84871MFT r84870reedy18:45, 27 March 2011

Status & tagging log