Call firstCallInit() before cloning $wgParser.
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 4 Jul 2006 09:13:10 +0000 (09:13 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 4 Jul 2006 09:13:10 +0000 (09:13 +0000)
includes/MessageCache.php

index cebb86f..c8b7124 100644 (file)
@@ -524,6 +524,9 @@ class MessageCache {
        function transform( $message ) {
                global $wgParser;
                if ( !$this->mParser && isset( $wgParser ) ) {
+                       # Do some initialisation so that we don't have to do it twice
+                       $wgParser->firstCallInit();
+                       # Clone it and store it
                        $this->mParser = clone $wgParser;
                }
                if ( !$this->mDisableTransform && $this->mParser ) {