r44433 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44432‎ | r44433 | r44434 >
Date:23:27, 10 December 2008
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
(bug 16589) CoreParserFunctions error causes 500
Modified paths:
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -283,8 +283,8 @@
284284
285285 // Register dependency in templatelinks
286286 $id = $title->getArticleId();
287 - $revid = Revision::newFromTitle($title);
288 - $parser->mOutput->addTemplate($title, $id, $revid);
 287+ $rev = Revision::newFromTitle($title);
 288+ $parser->mOutput->addTemplate( $title, $id, $rev->getId() );
289289 }
290290 return self::formatRaw( $length, $raw );
291291 }

Comments

#Comment by Brion VIBBER (talk | contribs)   01:13, 11 December 2008

When using on a non-existent page now:

Fatal error: Call to a member function getId() on a non-object in /Library/WebServer/Documents/trunk/includes/parser/CoreParserFunctions.php on line 287

#Comment by Brion VIBBER (talk | contribs)   01:19, 11 December 2008

Status & tagging log