bugfix (Exception: Serialization of 'Closure' is not allowed)


bugfix (Exception: Serialization of 'Closure' is not allowed)

Back in 2011 there was a problem where when a form was parsed bits of parser data (e.g. JavaScript links) were
included twice in the ParserOutput. What exactly the problem was and how it can be reproduced is not clear

The solution back then was to deep clone the parser by serializing and unserializing it and then use the clone
for parsing the form. Just using a new Parser object was not possible as it misses the parser state from earlier
operations on the parser, e.g. by the MW core or other extensions.

In recent MediaWiki versions closures were introduced in the Parser (and/or its member variables), so
serialization now throws an exception. This patch removes the deep cloning, so that for parsing the form the
original parser is used again. This will likely lead to the old problematic behaviour, which will have to be
fixed without using serialization.

See 4c69d35b22f271dc95963d915f55248431202744 (http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88564)
and 647b5b49e90286c4f4a1638f9cb3222c1f08d804 (http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88685)

Change-Id: I1262d2c9d478790e757abc42b0de017dafb4666b