Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335393 )

Change subject: Replace use of &$this
......................................................................

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
---
M SimpleCaptcha/Captcha.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/93/335393/1

diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index 7de4838..7a0d90c 100644
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -674,7 +674,7 @@
                                $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 );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/335393
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I065808a2c4dc9bcb80861a79b46cf4b446b70d65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to