diff options
Diffstat (limited to 'includes/parser/Parser.php')
-rw-r--r-- | includes/parser/Parser.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e9698527167e..92c0c2df4659 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5778,6 +5778,14 @@ class Parser { $this ); + if ( $rev === false ) { + // The revision record callback returns `false` (not null) to + // indicate that the revision is missing. (See for example + // Parser::statelessFetchRevisionRecord(), the default callback.) + // This API expects `null` instead. (T251952) + $rev = null; + } + if ( $this->mRevisionId === null && $rev && $rev->getId() ) { // We are in preview mode (mRevisionId is null), and the current revision callback // returned an existing revision. Ignore it and return null, it's probably the page's |