Thread:Project:Support desk/Hooks and Parsers duplicate pages/reply (11)

First, you should get rid of the E_STRICT notices about undefined variables. These are caused when a variable is used before it is assigned and are indicative of bigger problems.

Next, you're trying to use an object (WikitextContent) as a string. You should probably look at the getSection and replaceSection methods. (Not tested, I haven't worked with the WikitextContent object.)