Don't pass $this by reference

Bug: T153505
Change-Id: Ife076b323b1f4091fd851acb4b470000d2206cae
This commit is contained in:
Kunal Mehta 2017-08-31 21:09:15 -07:00 committed by Reedy
parent 38c524d370
commit edff0350a1
2 changed files with 5 additions and 4 deletions

View file

@ -288,7 +288,9 @@ class VectorTemplate extends BaseTemplate {
echo $this->makeListItem( $key, $val );
}
if ( $hook !== null ) {
Hooks::run( $hook, [ &$this, true ] );
// Avoid PHP 7.1 warning
$skin = $this;
Hooks::run( $hook, [ &$skin, true ] );
}
?>
</ul>

View file

@ -1,11 +1,10 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Usage.ReferenceThis.Found"/>
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc"/>