Manual talk:Hooks/SkinTemplateOutputPageBeforeExec

When I try to use this hook in an extension, the MediaWiki page shows lots of warnings like this:


 * Warning: Cannot modify header information - headers already sent by (output started at (myexteion).php:14) in includes/WebResponse.php on line 1

Is this hook not suited for use in an extension? How can these warnings be suprssed?

Example: suppress "User contributions" link in the toolbox for non-sysops
Add in LocalSettings.php to suppress "User contributions" link in the toolbox for non-sysops (tested with MediaWiki 1.15.1 --Wikinaut 17:29, 7 January 2010 (UTC)).

Note: This code suppresses only the link in the toolbox. Read here, how disable the Special:Contribution page as such.