1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Revert HipHop volatile symbol workaround.

This commit is contained in:
epriestley 2011-03-02 17:20:54 -08:00
parent 2f3d98b24b
commit 6439cd9856
3 changed files with 7 additions and 28 deletions

View file

@ -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

View file

@ -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();
}

View file

@ -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);
}