mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Replace use of &$this
Use of &$this doesn't work in PHP 7.1. For callbacks to methods like array_map() it's completely unnecessary, while for hooks we still need to pass a reference and so we need to copy $this into a local variable. Bug: T153505 Change-Id: I065808a2c4dc9bcb80861a79b46cf4b446b70d65
This commit is contained in:
parent
8427731a58
commit
8bfc15c729
|
@ -674,7 +674,7 @@ class SimpleCaptcha {
|
|||
$newLinks = $this->findLinks( $title, $newtext );
|
||||
}
|
||||
|
||||
$unknownLinks = array_filter( $newLinks, [ &$this, 'filterLink' ] );
|
||||
$unknownLinks = array_filter( $newLinks, [ $this, 'filterLink' ] );
|
||||
$addedLinks = array_diff( $unknownLinks, $oldLinks );
|
||||
$numLinks = count( $addedLinks );
|
||||
|
||||
|
|
Loading…
Reference in a new issue