Fixed internalClean class/method existence check for HHVM
[lhc/web/wiklou.git] / includes / parser / MWTidy.php
index 7b699d2..7b53776 100644 (file)
@@ -246,7 +246,9 @@ class MWTidy {
                global $wgTidyConf, $wgDebugTidy;
                wfProfileIn( __METHOD__ );
 
-               if ( !class_exists( 'tidy' ) ) {
+               if ( ( !wfIsHHVM() && !class_exists( 'tidy' ) ) ||
+                       ( wfIsHHVM() && !function_exists( 'tidy_repair_string' ) )
+               ) {
                        wfWarn( "Unable to load internal tidy class." );
                        $retval = -1;