SpecialDoubleRedirects: Fix undefined '$result->namespace' notice
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 10 Aug 2017 20:26:08 +0000 (16:26 -0400)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 10 Aug 2017 20:26:08 +0000 (16:26 -0400)
commit8acb5869d587dea0ce60af5f216a9f5119c0c00b
treed444338001687b14889a150e98fd9635ab969039
parent802e79a13fa3afa2fbcb723f278d1e9782bb3db4
SpecialDoubleRedirects: Fix undefined '$result->namespace' notice

Follows-up 7be1a8c0bc4d29d.

$result is used for both the original and the on-demand deep
query (in case of cache). However this re-query can fail if the
page no longer exists.

This used to be accounted for by creating the Title object before
(possibly) trying to re-query, and also checked for with "if !$result",
which is only intended to happen if the re-query failed (the initial
value of $result comes from the main (cacheable) query, and always
exists.

Could be moved by moving the $titleA assignment back up, but that
doesn't address the confusion problem that led to this.

Fix it by using a separate variable names.

Bug: T173045
Change-Id: I0e9ae89a3772b33b916b506033bd334ade5f03fa
includes/specials/SpecialDoubleRedirects.php