$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