double HTML escaped
* (bug 27700) The upload protection can now also be set for files that do not
exist.
+* (bug 27763) Article::getParserOutput() no longer throws a fatal given when an
+ incorrect revision ID is passed.
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result
wfIncrStats( 'pcache_miss_stub' );
}
- $parserOutput = false;
if ( $useParserCache ) {
$parserOutput = ParserCache::singleton()->get( $this, $this->getParserOptions() );
+ if ( $parserOutput !== false ) {
+ return $parserOutput;
+ }
}
- if ( $parserOutput === false ) {
- // Cache miss; parse and output it.
+ $text = false;
+ // Cache miss; parse and output it.
+ if ( $oldid !== null ) {
$rev = Revision::newFromTitle( $this->getTitle(), $oldid );
-
- return $this->getOutputFromWikitext( $rev->getText(), $useParserCache );
- } else {
- return $parserOutput;
+ if ( $rev !== null ) {
+ $text = $rev->getText();
+ }
}
+ if ( $text === false ) {
+ $text = $this->getRawText();
+ }
+
+ return $this->getOutputFromWikitext( $text, $useParserCache );
}
}