From: Kunal Mehta Date: Thu, 7 Jun 2018 19:52:04 +0000 (-0700) Subject: Ensure $user is passed by reference in TitleMoveComplete hook on HHVM X-Git-Tag: 1.34.0-rc.0~5150^2 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=d5e4bf920c7;p=lhc%2Fweb%2Fwiklou.git Ensure $user is passed by reference in TitleMoveComplete hook on HHVM Suggested by Anomie in T118683#3688320. Bug: T118683 Change-Id: I57e05c5ae42c8b85d0a8f9631a459c5686b27893 --- diff --git a/includes/MovePage.php b/includes/MovePage.php index fc9f6a6676..1e9570d2f7 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -415,7 +415,9 @@ class MovePage { new AtomicSectionUpdate( $dbw, __METHOD__, - function () use ( $params ) { + // Hold onto $user to avoid HHVM bug where it no longer + // becomes a reference (T118683) + function () use ( $params, &$user ) { Hooks::run( 'TitleMoveComplete', $params ); } )