LukBukkit (Code Review)
2017-12-30 20:48:53 UTC
LukBukkit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401097 )
Change subject: Avoid PHP 7.1 warning of &$this usage
......................................................................
Avoid PHP 7.1 warning of &$this usage
Bug: T153505
Change-Id: If3ae877790536fcd55b79bb98716ca20ded9d50e
---
M includes/DeskMessMirroredTemplate.php
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DeskMessMirrored refs/changes/97/401097/1
diff --git a/includes/DeskMessMirroredTemplate.php b/includes/DeskMessMirroredTemplate.php
index 6a8a181..a0fd137 100644
--- a/includes/DeskMessMirroredTemplate.php
+++ b/includes/DeskMessMirroredTemplate.php
@@ -254,8 +254,9 @@
foreach ( $this->getToolbox() as $key => $tbitem ) {
echo $this->makeListItem( $key, $tbitem );
}
-
- Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $template = $this;
+ Hooks::run( 'SkinTemplateToolboxEnd', array( &$template, true ) );
echo '</ul>';
} // toolbox()
--
To view, visit https://gerrit.wikimedia.org/r/401097
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3ae877790536fcd55b79bb98716ca20ded9d50e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DeskMessMirrored
Gerrit-Branch: master
Gerrit-Owner: LukBukkit <***@gmail.com>
Change subject: Avoid PHP 7.1 warning of &$this usage
......................................................................
Avoid PHP 7.1 warning of &$this usage
Bug: T153505
Change-Id: If3ae877790536fcd55b79bb98716ca20ded9d50e
---
M includes/DeskMessMirroredTemplate.php
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DeskMessMirrored refs/changes/97/401097/1
diff --git a/includes/DeskMessMirroredTemplate.php b/includes/DeskMessMirroredTemplate.php
index 6a8a181..a0fd137 100644
--- a/includes/DeskMessMirroredTemplate.php
+++ b/includes/DeskMessMirroredTemplate.php
@@ -254,8 +254,9 @@
foreach ( $this->getToolbox() as $key => $tbitem ) {
echo $this->makeListItem( $key, $tbitem );
}
-
- Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $template = $this;
+ Hooks::run( 'SkinTemplateToolboxEnd', array( &$template, true ) );
echo '</ul>';
} // toolbox()
--
To view, visit https://gerrit.wikimedia.org/r/401097
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3ae877790536fcd55b79bb98716ca20ded9d50e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DeskMessMirrored
Gerrit-Branch: master
Gerrit-Owner: LukBukkit <***@gmail.com>