Page MenuHomePhabricator

Cannot use $this as a parameter
Closed, ResolvedPublic

Description

tests/phpunit/includes/search/SearchIndexFieldTest.php

		$field1->setMergeCallback(
			function ( $this, $that ) {
				return "test";
			}
		);

Noticed on travis PHP 7 builds

https://travis-ci.org/wikimedia/mediawiki/jobs/209530031

PHP Fatal error:  Cannot use $this as parameter in /home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/search/SearchIndexFieldTest.php on line 49

Caused by https://github.com/wikimedia/mediawiki/commit/cae86036aaa8929805bd158b4f269e999a87625c

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 342496 had a related patch set uploaded (by EBernhardson):
[mediawiki/core] Don't use $this as a function argument

https://gerrit.wikimedia.org/r/342496

Change 342496 merged by jenkins-bot:
[mediawiki/core] Don't use $this as a function argument

https://gerrit.wikimedia.org/r/342496

Reedy assigned this task to EBernhardson.