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

Reedy created this task.Mar 10 2017, 2:30 AM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptMar 10 2017, 2:30 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Reedy moved this task from Unsorted to PHP 7 on the [DO NOT USE] NewPHP board.Mar 10 2017, 2:31 AM

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 closed this task as Resolved.