From edff0350a1d76d7daa57d102f2aa14d2f3157b3b Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 31 Aug 2017 21:09:15 -0700 Subject: [PATCH] Don't pass $this by reference Bug: T153505 Change-Id: Ife076b323b1f4091fd851acb4b470000d2206cae --- VectorTemplate.php | 4 +++- phpcs.xml | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VectorTemplate.php b/VectorTemplate.php index 50c4439c8..8d0426508 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -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 ] ); } ?> diff --git a/phpcs.xml b/phpcs.xml index 775a8b30a..a14345693 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,11 +1,10 @@ - - + + - .