Use HPHP_VERSION constant to detect HipHop
authorKevin Israel <pleasestand@live.com>
Thu, 3 Oct 2013 06:33:27 +0000 (02:33 -0400)
committerKevin Israel <pleasestand@live.com>
Thu, 3 Oct 2013 06:33:27 +0000 (02:33 -0400)
Follows-up Ic3e769f1fbad4f7ad26dd819406796fee48c6b45.

Change-Id: I0210002c05efd79242b00592639b7be50a79020b

includes/GlobalFunctions.php
maintenance/Maintenance.php

index 318b151..b11bce9 100644 (file)
@@ -2459,7 +2459,7 @@ function wfIsWindows() {
  * @return Bool
  */
 function wfIsHipHop() {
-       return function_exists( 'hphp_thread_set_warmup_enabled' );
+       return defined( 'HPHP_VERSION' );
 }
 
 /**
index 0023c6d..1712b24 100644 (file)
@@ -485,7 +485,7 @@ abstract class Maintenance {
                }
 
                # Make sure we can handle script parameters
-               if ( !function_exists( 'hphp_thread_set_warmup_enabled' ) && !ini_get( 'register_argc_argv' ) ) {
+               if ( !defined( 'HPHP_VERSION' ) && !ini_get( 'register_argc_argv' ) ) {
                        $this->error( 'Cannot get command line arguments, register_argc_argv is set to false', true );
                }