hhvm: Check for tidy function instead of class
authorBryan Davis <bd808@wikimedia.org>
Wed, 10 Dec 2014 18:08:18 +0000 (11:08 -0700)
committerBryan Davis <bd808@wikimedia.org>
Wed, 10 Dec 2014 18:08:18 +0000 (11:08 -0700)
Bug: T78166
Change-Id: Ie60e23ffbafd698a3458eed1efce92d54c8d0c2a

includes/parser/MWTidy.php

index 7b699d2..8ec324c 100644 (file)
@@ -246,7 +246,9 @@ class MWTidy {
                global $wgTidyConf, $wgDebugTidy;
                wfProfileIn( __METHOD__ );
 
-               if ( !class_exists( 'tidy' ) ) {
+               if ( !class_exists( 'tidy' ) ||
+                       ( wfIsHHVM() && !function_exists('tidy_repair_string') )
+               ) {
                        wfWarn( "Unable to load internal tidy class." );
                        $retval = -1;