From 93d0572d76c18d19a4f718ef355be2e39ab79151 Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Thu, 3 Oct 2013 02:33:27 -0400 Subject: [PATCH] Use HPHP_VERSION constant to detect HipHop Follows-up Ic3e769f1fbad4f7ad26dd819406796fee48c6b45. Change-Id: I0210002c05efd79242b00592639b7be50a79020b --- includes/GlobalFunctions.php | 2 +- maintenance/Maintenance.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 318b1513f4..b11bce9b93 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2459,7 +2459,7 @@ function wfIsWindows() { * @return Bool */ function wfIsHipHop() { - return function_exists( 'hphp_thread_set_warmup_enabled' ); + return defined( 'HPHP_VERSION' ); } /** diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 0023c6d8ad..1712b24910 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -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 ); } -- 2.20.1