Replace use of &$this
[lhc/web/wiklou.git] / includes / specials / SpecialMovepage.php
index 298d6c4..0281b15 100644 (file)
@@ -630,7 +630,9 @@ class MovePageForm extends UnlistedSpecialPage {
                        $newLink )->params( $oldText, $newText )->parseAsBlock() );
                $out->addWikiMsg( $msgName );
 
-               Hooks::run( 'SpecialMovepageAfterMove', [ &$this, &$ot, &$nt ] );
+               // Avoid PHP 7.1 warning from passing $this by reference
+               $movePage = $this;
+               Hooks::run( 'SpecialMovepageAfterMove', [ &$movePage, &$ot, &$nt ] );
 
                # Now we move extra pages we've been asked to move: subpages and talk
                # pages.  First, if the old page or the new page is a talk page, we