Fix for bug 13770, second attempt. Tested with a conflicting install of both dom...
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 4 Sep 2008 06:19:27 +0000 (06:19 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 4 Sep 2008 06:19:27 +0000 (06:19 +0000)
includes/parser/Parser.php

index 6a85f29..346be86 100644 (file)
@@ -134,6 +134,10 @@ class Parser
                $this->mVarCache = array();
                if ( isset( $conf['preprocessorClass'] ) ) {
                        $this->mPreprocessorClass = $conf['preprocessorClass'];
+               } elseif ( extension_loaded( 'domxml' ) ) {
+                       // PECL extension that conflicts with the core DOM extension (bug 13770)
+                       wfDebug( "Warning: you have the obsolete domxml extension for PHP. Please remove it!\n" );
+                       $this->mPreprocessorClass = 'Preprocessor_Hash';
                } elseif ( extension_loaded( 'dom' ) ) {
                        $this->mPreprocessorClass = 'Preprocessor_DOM';
                } else {