Page MenuHomePhabricator

Use of &$this in hooks triggers warnings in PHP 7.1
Closed, ResolvedPublic

Description

Via @mwjames:

Code like Hooks::run( 'WantedPages::getQueryInfo', [ &$this, &$query ] ); will trigger warnings in PHP 7.1. Ideally the solution would be to remove &, which hasn't been needed since PHP 4, however that breaks backwards-compatibility.

Instead, we can rename $this to a different variable, and then pass it by reference. Example:

		// Avoid PHP 7.1 warning of passing $this by reference
		$editPage = $this;
		Hooks::run( 'EditPage::showEditForm:initial', [ &$editPage, &$out ] );

See https://bugs.php.net/bug.php?id=73751 / https://wiki.php.net/rfc/this_var

Example commit to fix this issue: https://gerrit.wikimedia.org/r/#/c/328387/

More information:

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 375381 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/skins/MonoBook@REL1_27] Don't pass $this by reference

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

Change 375382 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/skins/MonoBook@REL1_28] Don't pass $this by reference

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

Change 375383 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/skins/MonoBook@REL1_29] Don't pass $this by reference

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

Change 375113 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Don't pass $this by reference

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

Change 375381 merged by jenkins-bot:
[mediawiki/skins/MonoBook@REL1_27] Don't pass $this by reference

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

Change 375382 merged by jenkins-bot:
[mediawiki/skins/MonoBook@REL1_28] Don't pass $this by reference

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

Change 375383 merged by jenkins-bot:
[mediawiki/skins/MonoBook@REL1_29] Don't pass $this by reference

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

Change 375385 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/skins/Vector@REL1_27] Don't pass $this by reference

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

Change 375386 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/skins/Vector@REL1_28] Don't pass $this by reference

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

Change 375387 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/skins/Vector@REL1_29] Don't pass $this by reference

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

Change 375385 merged by jenkins-bot:
[mediawiki/skins/Vector@REL1_27] Don't pass $this by reference

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

Change 375386 merged by jenkins-bot:
[mediawiki/skins/Vector@REL1_28] Don't pass $this by reference

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

Change 375387 merged by jenkins-bot:
[mediawiki/skins/Vector@REL1_29] Don't pass $this by reference

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

Aklapper moved this task from Doing to Backlog on the good first bug board.Oct 16 2017, 2:36 PM

Change 341793 abandoned by Krinkle:
Replace the use of &$this

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

Framawiki moved this task from Backlog to Doing on the good first bug board.Dec 2 2017, 1:29 PM

Some, but not many to go!

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki$ find extensions skins -name \*.php -exec grep --perl-regexp '&\$this(?!->|\[)' {} + | gawk -F/ '{print $1 FS $2}' | sort | uniq -c | sed 's/^ *\([0-9]\+\) \(.*\)/* \2 (\1 uses)/;s/(1 uses)/(1 use)/;'
* extensions/BlueSpiceExtendedSearch (2 uses)
* extensions/GlobalContribs (1 use)
* extensions/InterwikiIntegration (3 uses)
* extensions/MSSQLBackCompat (2 uses)
* extensions/MultiUpload (1 use)
* extensions/NewUserNotif (2 uses)
* extensions/SemanticPageMaker (4 uses)
* extensions/SocialProfile (4 uses)
* extensions/SwiftCloudFiles (4 uses)
* skins/apex (1 use)
* skins/Bouquet (1 use)
* skins/DeepSea (1 use)
* skins/DeskMessMirrored (1 use)
* skins/Dusk (1 use)
* skins/DuskToDawn (1 use)
* skins/erudite (1 use)
* skins/Gamepress (1 use)
* skins/p2wiki (1 use)
* skins/Refreshed (1 use)
* skins/Slate (1 use)
* skins/Synagonism (1 use)
* skins/Truglass (1 use)
* skins/VectorV2 (1 use)
* skins/webplatform (2 uses)
* skins/WPtouch (1 use)
Restricted Application added a project: Social-Tools. · View Herald TranscriptDec 8 2017, 3:35 AM
Reedy added a comment.Dec 8 2017, 3:53 AM

And possibly some false positives here?

Certainly looks to be for BlueSpiceExtendedSearch

Reedy added a comment.Dec 8 2017, 3:56 AM
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki$ find extensions skins -name \*.php -exec grep --perl-regexp '&\$this(?!->|\[)' {} +
extensions/InterwikiIntegration/InterwikiIntegrationRecentChange.php:		Hooks::run( 'RecentChange_save', array( &$this ) );
extensions/InterwikiIntegration/InterwikiIntegrationChangesList.php:			array(&$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched) );
extensions/InterwikiIntegration/InterwikiIntegrationChangesList.php:		Hooks::run( 'OldInterwikiIntegrationChangesListRecentChangesLine', array(&$this, &$s, $rc) );
extensions/MultiUpload/SpecialMultiUpload.php:			if ( !Hooks::run( 'UploadForm:initial', array( &$this ) ) ) {
extensions/MSSQLBackCompat/DatabaseMssqlOld.php:				$from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) );
extensions/MSSQLBackCompat/DatabaseMssqlOld.php:			$srcTable =  implode( ',', array_map( array( &$this, 'tableName' ), $srcTable ) );
extensions/GlobalContribs/SpecialGlobalContributions.php:		Hooks::run( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
extensions/SwiftCloudFiles/php-cloudfiles-wmf/cloudfiles_http.php:		curl_setopt( $curl_ch, CURLOPT_HEADERFUNCTION, array( &$this, '_auth_hdr_cb' ) );
extensions/SwiftCloudFiles/php-cloudfiles-wmf/cloudfiles_http.php:		curl_setopt( $ch, CURLOPT_HEADERFUNCTION, array( &$this, '_header_cb' ) );
extensions/SwiftCloudFiles/php-cloudfiles-wmf/cloudfiles_http.php:			curl_setopt( $ch, CURLOPT_WRITEFUNCTION, array( &$this, '_write_cb' ) );
extensions/SwiftCloudFiles/php-cloudfiles-wmf/cloudfiles_http.php:			curl_setopt( $ch, CURLOPT_READFUNCTION, array( &$this, '_read_cb' ) );
extensions/BlueSpiceExtendedSearch/src/Lookup.php:		$aBase = &$this;
extensions/BlueSpiceExtendedSearch/src/Lookup.php:		$aBase = &$this;
extensions/SocialProfile/UserProfile/UserProfilePage.php:		if ( !Hooks::run( 'UserProfileBeginLeft', array( &$this ) ) ) {
extensions/SocialProfile/UserProfile/UserProfilePage.php:		if ( !Hooks::run( 'UserProfileEndLeft', array( &$this ) ) ) {
extensions/SocialProfile/UserProfile/UserProfilePage.php:		if ( !Hooks::run( 'UserProfileBeginRight', array( &$this ) ) ) {
extensions/SocialProfile/UserProfile/UserProfilePage.php:		if ( !Hooks::run( 'UserProfileEndRight', array( &$this ) ) ) {
extensions/SemanticPageMaker/specials/WidgetAssembler/SPM_UploadWindow2.php:		wfRunHooks( 'SpecialUploadComplete', array( &$this ) );
extensions/SemanticPageMaker/specials/WidgetAssembler/SPM_UploadWindow.php:		if ( !wfRunHooks( 'UploadForm:BeforeProcessing', array( &$this ) ) )
extensions/SemanticPageMaker/specials/WidgetAssembler/SPM_UploadWindow.php:		if ( !wfRunHooks( 'UploadForm:initial', array( &$this ) ) )
extensions/SemanticPageMaker/includes/widgets/SPM_WidgetPage.php:		if ( !wfRunHooks( 'SPMWidgetPageView', array( &$this ) ) )
extensions/NewUserNotif/NewUserNotif.class.php:		Hooks::run( 'NewUserNotifSubject', array( &$this, &$subjectLine, $wgSitename, $recipient, $user ) );
extensions/NewUserNotif/NewUserNotif.class.php:		Hooks::run( 'NewUserNotifBody', array( &$this, &$messageBody, $wgSitename, $recipient, $user ) );
skins/VectorV2/VectorV2Template.php:							Hooks::run( $hook, [ &$this, true ] );
skins/Dusk/includes/DuskTemplate.php:		Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/Gamepress/includes/GamepressTemplate.php:		Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/erudite/Erudite.skin.php:					Hooks::run( 'SkinTemplateToolboxEnd', array( &$this ) );
skins/Refreshed/includes/RefreshedTemplate.php:							Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/WPtouch/WPtouch.skin.php:				Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/Synagonism/SkinSynagonism.php:				wfRunHooks( $hook, array( &$this, true ) );
skins/webplatform/WebPlatformTemplate.class.php:							<?php Hooks::run( 'SkinBreadcrumb', [ &$this ] ); ?>
skins/webplatform/WebPlatformTemplate.class.php:						<?php /* wfRunHooks( 'SkinTOC', [ &$this ] );*/ ?>
skins/DuskToDawn/includes/DuskToDawnTemplate.php:		Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/Bouquet/includes/BouquetTemplate.php:		Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/p2wiki/P2wiki.skin.php:			wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
skins/Slate/SlateTemplate.php:							wfRunHooks( $hook, array( &$this, true ) );
skins/apex/ApexTemplate.php:				Hooks::run( $hook, [ &$this, true ] );
skins/DeepSea/DeepSea.skin.php:				Hooks::run( $hook, array( &$this, true ) );
skins/Truglass/includes/TruglassTemplate.php:		Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
skins/DeskMessMirrored/includes/DeskMessMirroredTemplate.php:		Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
Anomie added a comment.EditedDec 8 2017, 5:45 PM

And possibly some false positives here?
Certainly looks to be for BlueSpiceExtendedSearch

extensions/BlueSpiceExtendedSearch/src/Lookup.php:		$aBase = &$this;
extensions/BlueSpiceExtendedSearch/src/Lookup.php:		$aBase = &$this;

While this doesn't result in a warning, it also doesn't result in $aBase containing a reference. Unless a supported version of PHP (i.e. not PHP4) requires a reference there, the ampersand may as well be removed for cleanliness.

The same goes for all the examples where &$this is used to make a callable rather than being passed as an argument to a hook.

Aklapper removed amritsreekumar as the assignee of this task.Dec 15 2017, 10:13 AM
Aklapper updated the task description. (Show Details)
Aklapper added a subscriber: amritsreekumar.

@amritsreekumar: I'm going to remove you as assignee here, as there is more work to do and we're thinking of offering this task in Google Code-in 2017 to students. Thanks for all your patches and help in March!

Change 398672 had a related patch set uploaded (by Rafidaslam; owner: Rafid Aslam):
[mediawiki/extensions/GlobalContribs@master] SpecialGlobalContributions: Avoid &$this in hooks

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

Change 398673 had a related patch set uploaded (by Rafidaslam; owner: Rafid Aslam):
[mediawiki/extensions/SocialProfile@master] UserProfilePage: Avoid &$this in hooks

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

jayvdb added a subscriber: jayvdb.Dec 19 2017, 5:16 AM

@Reedy , the task description say " The solution is to remove the & " and

So basically this is just about removing one character, but you should check if the reference is actually needed/used. In nearly all cases, & is not needed.

However most of the examples are creating and using a new variable.
Should the task description be updated to mention this alternative solution?
And explain when each approach should be used?

Legoktm updated the task description. (Show Details)Dec 19 2017, 6:06 AM

The task description was wrong, I've updated it.

Change 398672 merged by jenkins-bot:
[mediawiki/extensions/GlobalContribs@master] SpecialGlobalContributions: Avoid &$this in hooks

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

Change 398673 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] UserProfilePage: Avoid &$this in hooks

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

The task description was wrong, I've updated it.

Thanks. I've updated the GCI tasks to match your modifications, and published the other four tasks in this series as they should be good to go now that we've got the description QA'd ;-)

Change 399762 had a related patch set uploaded (by Ryan10145; owner: Ryan10145):
[mediawiki/skins/webplatform@master] Changed &$this in hooks

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

Change 399763 had a related patch set uploaded (by Ryan10145; owner: Ryan10145):
[mediawiki/extensions/NewUserNotif@master] Changed &$this in hooks

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

Change 399763 merged by jenkins-bot:
[mediawiki/extensions/NewUserNotif@master] Changed &$this in hooks

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

Change 399762 merged by jenkins-bot:
[mediawiki/skins/webplatform@master] Changed &$this in hooks

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

lilydjwg removed a subscriber: lilydjwg.Dec 23 2017, 3:28 AM

I'm very much disappointed by the changes done here (as already expressed in the discussion at e.g. https://gerrit.wikimedia.org/r/399763). All these &$this are just wrong, and always have been wrong. They must all be changed to $this, and all hook handlers repeating the same error must be fixed.

What the patches do instead is introducing a local variable that does nothing. This is not fixing anything. This is actually making the situation worse.

Please stop making all this code more obscure and harder to maintain in the future.

All these &$this are just wrong, and always have been wrong.

It seems you're unaware of PHP history.

Back in PHP4, objects were passed by value instead of by reference. To avoid a copy, the function parameter had to be a reference. Even when $this was being passed. And, of course, call_user_func_array() needs to explicitly take a reference of parameters for which the target function is expecting a reference.

So, no, it hasn't "always been wrong".

Also, for that matter, back in PHP4 it was in fact legal to reassign $this. That sort of thing is one of many reasons why people hated PHP back then. Directly reassigning $this was prohibited in PHP 5, but even in 7.0.26 if you took a reference to $this then you could reassign it as you could any other reference. PHP 7.1 finally fixed that one.

They must all be changed to $this, and all hook handlers repeating the same error must be fixed.

Breaking every existing hook handler that takes a reference for a parameter where the hook caller would pass $this would be a rather large breaking change. Are you volunteering to take on that project? Will you do it in compliance with the deprecation policy?

What the patches do instead is introducing a local variable that does nothing.

It allows a reference to be passed to hook handlers that expect it, rather than breaking every such handler. That's not "nothing".

I started coding in PHP 3 and are aware of the history.

I'm afraid you did not got my argument. Not only is $thisShouldNotBeAReference = $this; […] &$thisShouldNotBeAReference semantically the same as &$this. It's worse, for a multitude of reasons. Nobody can systematically search and fix these places, now that they don't contain &$this any more. The code that is now left behind is confusing, bogus, and fragile. Any developer later looking at this code will wonder a) what the point of the useless variable is, and b) what the point of passing $this by reference is, if there is no code that does anything with this variable after the hook was triggered. People will remove the useless variable or the & and run into the unsolved issue again. Because the patches did not solved it. Also there is no need to change it the way as done in these patches, as it does not block us from using PHP 7. It's just a warning. All the patches do is hiding a systemic issue in the code.

The least minimal next step I expect to see here is a list of hooks that misuse references to $this, and ideally individual tickets for each of them to be fixed in the future.

Nobody can systematically search and fix these places, now that they don't contain &$this any more.

Sure you can. http://codesearch.wmflabs.org/search/?q=Avoid%20PHP%207.1%20warning%20from%20passing%20%5C%24this%20by%20reference&i=nope&files=&repos=

The code that is now left behind is confusing,

Maybe it would be, if we weren't commenting it to explain exactly why it's being done.

bogus,

Not really.

and fragile.

Not at all.

Any developer later looking at this code will wonder a) what the point of the useless variable is,

Only if they habitually ignore comments.

and b) what the point of passing $this by reference is, if there is no code that does anything with this variable after the hook was triggered.

That they might wonder. But,

People will remove the useless variable or the & and run into the unsolved issue again.

and then they will be enlightened. Or more likely, they'll be enlightened in code review, or if they just ask anyone who's been around long enough.

The least minimal next step I expect to see here is a list of hooks that misuse references to $this, and ideally individual tickets for each of them to be fixed in the future.

You know how to work Phabricator. But don't expect everyone else to work on your pet peeve.

Nobody can systematically search and fix these places, now that they don't contain &$this any more.

Sure you can. http://codesearch.wmflabs.org/search/?q=Avoid%20PHP%207.1%20warning%20from%20passing%20%5C%24this%20by%20reference&i=nope&files=&repos=

And, for that matter, http://codesearch.wmflabs.org/search/?q=%5B%20%5D%3D%20%5C%24this%3B&i=nope&files=&repos= doesn't seem to have too many false positives (and this one is probably even better).

And as a bonus, that search identifies some pre-PHP5.4 code that could be cleaned up too.

[…] if we weren't commenting it […]

Comments don't solve the issue here. Comments can give reasons, but they can not magically remove the confusion from confusing code.

[…] and fragile.

Not at all.

So you did not got my point. I'm sorry.

[…] if they just ask anyone who's been around long enough.

I hope you realize how flawed this advice is. Code must speak for itself. You can't rely on some experts to be available forever. There are entire books about the systemic issues that come with such an attitude.

[…] don't expect everyone else to work on your pet peeve.

Please check your tone and attitude. Thanks.

Have a nice holiday.

Change 400441 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/Dusk@master] Moved the $this references into variables

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

Change 400441 merged by jenkins-bot:
[mediawiki/skins/Dusk@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400562 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/erudite@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400563 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/Gamepress@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400693 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/Refreshed@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400693 merged by jenkins-bot:
[mediawiki/skins/Refreshed@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400563 merged by jenkins-bot:
[mediawiki/skins/Gamepress@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400562 merged by jenkins-bot:
[mediawiki/skins/erudite@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400717 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/WPtouch@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400718 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/DuskToDawn@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400719 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/Bouquet@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400717 merged by jenkins-bot:
[mediawiki/skins/WPtouch@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400718 merged by jenkins-bot:
[mediawiki/skins/DuskToDawn@master] Avoid PHP 7.1 warning of &$this usage

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

Change 400719 merged by jenkins-bot:
[mediawiki/skins/Bouquet@master] Avoid PHP 7.1 warning of &$this usage

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

Change 401095 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/apex@master] Avoid PHP 7.1 warning of &$this usage

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

Change 401096 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/Truglass@master] Avoid PHP 7.1 warning of &$this usage

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

Change 401097 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/skins/DeskMessMirrored@master] Avoid PHP 7.1 warning of &$this usage

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

Change 401095 merged by jenkins-bot:
[mediawiki/skins/apex@master] Avoid PHP 7.1 warning of &$this usage

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

Change 401096 merged by jenkins-bot:
[mediawiki/skins/Truglass@master] Avoid PHP 7.1 warning of &$this usage

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

Change 401097 merged by jenkins-bot:
[mediawiki/skins/DeskMessMirrored@master] Avoid PHP 7.1 warning of &$this usage

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

Change 341811 abandoned by SamanthaNguyen:
Replace the use of &$this

Reason:
This has been correctly fixed in I4dff3f65457682d87e2954f5b0f66b4ffc2f82b4

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

Change 410539 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/skins/p2wiki@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410541 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/MultiUpload@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410544 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/InterwikiIntegration@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410547 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/skins/Synagonism@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410548 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/skins/VectorV2@master] Avoid PHP 7.1 warning of passing $this by reference

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

Searched with https://codesearch.wmflabs.org/search/?q=%26%5C%24this%5Cs*%5B%5E-%5Cs%5C%5B%5D&i=nope&files=%5C.php&repos=

Uploaded patch set for the extensions/skins found there. Should be resolved when the patches are merged.
One extension in the list is in request for archive

Change 410539 merged by jenkins-bot:
[mediawiki/skins/p2wiki@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410541 merged by jenkins-bot:
[mediawiki/extensions/MultiUpload@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410544 merged by jenkins-bot:
[mediawiki/extensions/InterwikiIntegration@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410547 merged by jenkins-bot:
[mediawiki/skins/Synagonism@master] Avoid PHP 7.1 warning of passing $this by reference

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

Change 410548 merged by jenkins-bot:
[mediawiki/skins/VectorV2@master] Avoid PHP 7.1 warning of passing $this by reference

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

Umherirrender closed this task as Resolved.Feb 16 2018, 4:55 PM

Change 341800 abandoned by Isarra:
Replace the use of &$this

Reason:
Issue was otherwise resolved.

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