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