Ryan10145 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399763 )
Change subject: Changed &$this in hooks ...................................................................... Changed &$this in hooks &$this triggers warnings in PHP 7.1. Renaming the variable before passing it by reference avoids the warning, without breaking backwards compatibility. Bug: T153505 Change-Id: Iead52dc11280173c0d9c9081194a086886986038 --- M NewUserNotif.class.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NewUserNotif refs/changes/63/399763/1 diff --git a/NewUserNotif.class.php b/NewUserNotif.class.php index 975af8c..a760b86 100644 --- a/NewUserNotif.class.php +++ b/NewUserNotif.class.php @@ -87,7 +87,8 @@ private function makeSubject( $recipient, $user ) { global $wgSitename; $subjectLine = ""; - Hooks::run( 'NewUserNotifSubject', array( &$this, &$subjectLine, $wgSitename, $recipient, $user ) ); + $userNotif = $this; + Hooks::run( 'NewUserNotifSubject', array( &$userNotif, &$subjectLine, $wgSitename, $recipient, $user ) ); if (!strlen($subjectLine) ) return wfMessage( 'newusernotifsubj', $wgSitename )->inContentLanguage()->text(); return $subjectLine; @@ -102,7 +103,8 @@ private function makeMessage( $recipient, $user ) { global $wgSitename, $wgContLang; $messageBody = ""; - Hooks::run( 'NewUserNotifBody', array( &$this, &$messageBody, $wgSitename, $recipient, $user ) ); + $userNotif = $this; + Hooks::run( 'NewUserNotifBody', array( &$userNotif, &$messageBody, $wgSitename, $recipient, $user ) ); if (!strlen($messageBody) ) return wfMessage( 'newusernotifbody', -- To view, visit https://gerrit.wikimedia.org/r/399763 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iead52dc11280173c0d9c9081194a086886986038 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NewUserNotif Gerrit-Branch: master Gerrit-Owner: Ryan10145 <chang.ryan10...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits