mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
Add BC hack for some 2009 AbuseLog entries causing a fatal error
Some AbuseLog entries from 2009 are missing the 'timestamp' parameter used to compute the old wikitext of the page. This was only used for a short amount of time before https://phabricator.wikimedia.org/rEABFd1d27eede6536067c5180b2515ea937d71525d4d. Nowadays, it's causing a fatal error when we try to migrate the affected entries, see T246539#6388362. Since we only have a Title available, we cannot rebuild what the old wikitext would look like, so a placeholder text is used (this should hopefully be clearer than showing an empty string). Bug: T246539 Change-Id: I5230f2fdc84da121728a5a75da458f1a4ef1ecd3
This commit is contained in:
parent
cb9ed4a957
commit
5faea5ee58
|
@ -481,6 +481,11 @@ class AFComputedVariable {
|
|||
break;
|
||||
case 'revision-text-by-timestamp':
|
||||
$timestamp = $parameters['timestamp'];
|
||||
if ( $timestamp === null ) {
|
||||
// Temporary BC for T246539#6388362
|
||||
$result = '[Revision text not available]';
|
||||
break;
|
||||
}
|
||||
$title = $this->buildTitle( $parameters['namespace'], $parameters['title'] );
|
||||
$revRec = $services
|
||||
->getRevisionStore()
|
||||
|
|
Loading…
Reference in a new issue