Skip to content

Commit

Permalink
Improve a bit php8 compatibility
Browse files Browse the repository at this point in the history
PHP changed the way it exposes if a function
has variadic arguments or not, hence why we need
yet an other ifdef.
  • Loading branch information
jvoisin committed Feb 19, 2020
1 parent 4a6e9ce commit 394edbf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sp_disabled_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ static void should_disable(zend_execute_data* execute_data,
if (config_node->param || config_node->r_param ||
(config_node->pos != -1)) {
if (!builtin_param &&
execute_data->func->op_array.arg_info->is_variadic) {
#if PHP_VERSION_ID >= 80000
ZEND_ARG_IS_VARIADIC(execute_data->func->op_array.arg_info)
#else
execute_data->func->op_array.arg_info->is_variadic
#endif
){
sp_log_warn(
"disable_function",
"Snuffleupagus doesn't support variadic functions yet, sorry. "
Expand Down

0 comments on commit 394edbf

Please sign in to comment.