called in a way that matches the documented parameters
As it was, when an extension tried to use BeforeInitialize with the
documented parameters this resulted in an exception:
Detected bug in an extension! Hook HookFunctionName has invalid
call signature; Parameter 2 to HookFunctionName() expected to be a
reference, value given
$output->setPrintable();
}
$output->setPrintable();
}
- wfRunHooks( 'BeforeInitialize',
- array( &$title, null, &$output, &$user, $request, $this ) );
-
// Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty.
if ( is_null( $title ) || ( $title->getDBkey() == '' && $title->getInterwiki() == '' ) ||
$title->isSpecial( 'Badtitle' ) )
// Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty.
if ( is_null( $title ) || ( $title->getDBkey() == '' && $title->getInterwiki() == '' ) ||
$title->isSpecial( 'Badtitle' ) )
wfProfileOut( __METHOD__ );
throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle() returned neither an object nor a URL" );
}
wfProfileOut( __METHOD__ );
throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle() returned neither an object nor a URL" );
}
+ wfRunHooks( 'BeforeInitialize',
+ array( &$title, &$article, &$output, &$user, $request, $this ) );