mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-09-24 10:48:17 +00:00
Merge "Temporarily catch BadMethodCallException when computing _links vars"
This commit is contained in:
commit
ed1c996f65
|
@ -221,8 +221,15 @@ class AFComputedVariable {
|
|||
|
||||
$new_text = $vars->getVar( $textVar )->toString();
|
||||
$content = ContentHandler::makeContent( $new_text, $article->getTitle() );
|
||||
$editInfo = $article->prepareContentForEdit( $content );
|
||||
$links = array_keys( $editInfo->output->getExternalLinks() );
|
||||
try {
|
||||
// @fixme TEMPORARY WORKAROUND FOR T187153
|
||||
$editInfo = $article->prepareContentForEdit( $content );
|
||||
$links = array_keys( $editInfo->output->getExternalLinks() );
|
||||
} catch ( BadMethodCallException $e ) {
|
||||
$logger = LoggerFactory::getInstance( 'AbuseFilter' );
|
||||
$logger->warning( 'Caught BadMethodCallException - T187153' );
|
||||
$links = [];
|
||||
}
|
||||
$result = $links;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue