Index: trunk/phase3/includes/parser/CoreParserFunctions.php |
— | — | @@ -284,7 +284,7 @@ |
285 | 285 | // Register dependency in templatelinks |
286 | 286 | $id = $title->getArticleId(); |
287 | 287 | $rev = Revision::newFromTitle($title); |
288 | | - $parser->mOutput->addTemplate( $title, $id, $rev->getId() ); |
| 288 | + $parser->mOutput->addTemplate( $title, $id, $rev ? $rev->getId() : 0 ); |
289 | 289 | } |
290 | 290 | return self::formatRaw( $length, $raw ); |
291 | 291 | } |