From 6439cd98564a1825ca2925cff57b750af4c0006d Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 2 Mar 2011 17:20:54 -0800 Subject: [PATCH] Revert HipHop volatile symbol workaround. --- .../base/AphrontDatabaseConnection.php | 10 ++-------- src/storage/queryfx/queryfx.php | 16 +++++----------- webroot/index.php | 9 --------- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/src/storage/connection/base/AphrontDatabaseConnection.php b/src/storage/connection/base/AphrontDatabaseConnection.php index 150f43b960..5d7fd27e27 100644 --- a/src/storage/connection/base/AphrontDatabaseConnection.php +++ b/src/storage/connection/base/AphrontDatabaseConnection.php @@ -36,21 +36,15 @@ abstract class AphrontDatabaseConnection { abstract public function escapeStringForLikeClause($string); public function queryData($pattern/*, $arg, $arg, ... */) { - if (false) { - // Workaround for the HPHP workaround: ensure we include this module - // since we really are using the function. - queryfx($this, $pattern); - } - $args = func_get_args(); array_unshift($args, $this); - return hphp_workaround_call_user_func_array('queryfx_all', $args); + return call_user_func_array('queryfx_all', $args); } public function query($pattern/*, $arg, $arg, ... */) { $args = func_get_args(); array_unshift($args, $this); - return hphp_workaround_call_user_func_array('queryfx', $args); + return call_user_func_array('queryfx', $args); } // TODO: Probably need to reset these when we catch a connection exception diff --git a/src/storage/queryfx/queryfx.php b/src/storage/queryfx/queryfx.php index 91cb5bb376..6195d9c88e 100644 --- a/src/storage/queryfx/queryfx.php +++ b/src/storage/queryfx/queryfx.php @@ -20,14 +20,8 @@ * @group storage */ function queryfx(AphrontDatabaseConnection $conn, $sql/*, ... */) { - if (false) { - // Workaround for the HPHP workaround: ensure we include this module - // since we really are using the function. - qsprintf($conn, $sql); - } - $argv = func_get_args(); - $query = hphp_workaround_call_user_func_array('qsprintf', $argv); + $query = call_user_func_array('qsprintf', $argv); $conn->executeRawQuery($query); } @@ -36,7 +30,7 @@ function queryfx(AphrontDatabaseConnection $conn, $sql/*, ... */) { */ function vqueryfx($conn, $sql, $argv) { array_unshift($argv, $conn, $sql); - hphp_workaround_call_user_func_array('queryfx', $argv); + call_user_func_array('queryfx', $argv); } /** @@ -44,7 +38,7 @@ function vqueryfx($conn, $sql, $argv) { */ function queryfx_all($conn, $sql/*, ... */) { $argv = func_get_args(); - hphp_workaround_call_user_func_array('queryfx', $argv); + call_user_func_array('queryfx', $argv); return $conn->selectAllResults(); } @@ -53,7 +47,7 @@ function queryfx_all($conn, $sql/*, ... */) { */ function queryfx_one($conn, $sql/*, ... */) { $argv = func_get_args(); - $ret = hphp_workaround_call_user_func_array('queryfx_all', $argv); + $ret = call_user_func_array('queryfx_all', $argv); if (count($ret) > 1) { throw new AphrontQueryCountException( 'Query returned more than one row.'); @@ -65,6 +59,6 @@ function queryfx_one($conn, $sql/*, ... */) { function vqueryfx_all($conn, $sql, array $argv) { array_unshift($argv, $conn, $sql); - hphp_workaround_call_user_func_array('queryfx', $argv); + call_user_func_array('queryfx', $argv); return $conn->selectAllResults(); } diff --git a/webroot/index.php b/webroot/index.php index 37e22d8f3f..9960f30c71 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -176,12 +176,3 @@ function phabricator_fatal_config_error($msg) { die(); } - -/** - * Workaround for HipHop bug, see Facebook Task #503624. - */ -function hphp_workaround_call_user_func_array($func, array $array) { - $f = new ReflectionFunction($func); - return $f->invokeArgs($array); -} -