Fixed internalClean class/method existence check for HHVM
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 10 Dec 2014 19:04:56 +0000 (11:04 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 10 Dec 2014 19:04:58 +0000 (19:04 +0000)
* Follows up 4f281083fda91879a77fb87d64d8a9533526bd0c

Change-Id: I5fa406ed1c4f2eefd1c22e9ab90e72655f31d162

includes/parser/MWTidy.php

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