Don't use $this as a function argument
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 13 Mar 2017 18:12:50 +0000 (11:12 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 13 Mar 2017 18:12:50 +0000 (11:12 -0700)
PHP 7.1 adds the limitation that $this cannot be used as a function
parameter. Ensure forward compatability by renaming the parameters.

Bug: T160144
Change-Id: I33d2ab1ffeeeb32e3a467cc146ee8feef0255258

tests/phpunit/includes/search/SearchIndexFieldTest.php

index a5a1b7a..6b12229 100644 (file)
@@ -46,7 +46,7 @@ class SearchIndexFieldTest extends MediaWikiTestCase {
                $this->assertFalse( $field1->merge( $field2 ) );
 
                $field1->setMergeCallback(
-                       function ( $this, $that ) {
+                       function ( $a, $b ) {
                                return "test";
                        }
                );