diff options
author | Matthew Flaschen <mflaschen@wikimedia.org> | 2017-08-04 18:39:38 -0400 |
---|---|---|
committer | Matthew Flaschen <mflaschen@wikimedia.org> | 2017-08-04 18:39:38 -0400 |
commit | 7362910408bbe5785e952acb67ba8084ceecd2ad (patch) | |
tree | 86481771dbd4379379cfa6d58cc8cf15aa836c7a /includes/deferred | |
parent | 1c8d273a7e77aa7be70c51877e129d287e3058ac (diff) | |
download | mediawikicore-7362910408bbe5785e952acb67ba8084ceecd2ad.tar.gz mediawikicore-7362910408bbe5785e952acb67ba8084ceecd2ad.zip |
WANCacheReapUpdate: Handle special pages without exception
Bug: T172560
Change-Id: I95a6da2c5303e5fc4e931734e39974825d4c3c53
Diffstat (limited to 'includes/deferred')
-rw-r--r-- | includes/deferred/WANCacheReapUpdate.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/deferred/WANCacheReapUpdate.php b/includes/deferred/WANCacheReapUpdate.php index b12af1965559..cbeb1fc77c7b 100644 --- a/includes/deferred/WANCacheReapUpdate.php +++ b/includes/deferred/WANCacheReapUpdate.php @@ -104,7 +104,13 @@ class WANCacheReapUpdate implements DeferrableUpdate { /** @var WikiPage[]|LocalFile[]|User[] $entities */ $entities = []; - $entities[] = WikiPage::factory( Title::newFromTitleValue( $t ) ); + // You can't create a WikiPage for special pages (-1) or other virtual + // namespaces, but special pages do appear in RC sometimes, e.g. for logs + // of AbuseFilter filter changes. + if ( $t->getNamespace() >= 0 ) { + $entities[] = WikiPage::factory( Title::newFromTitleValue( $t ) ); + } + if ( $t->inNamespace( NS_FILE ) ) { $entities[] = wfLocalFile( $t->getText() ); } |