diff options
| author | jvoisin | 2020-02-19 21:52:32 +0100 |
|---|---|---|
| committer | jvoisin | 2020-02-19 21:56:41 +0100 |
| commit | 394edbf3b5232c30dd3019f8c3a5dfadc310884f (patch) | |
| tree | 8bbf1b28ab09c22b7b8d6db4bb0bd2a8a6c6ab16 /src/sp_disabled_functions.c | |
| parent | 4a6e9ce42982612a2ea1e5d0f79164b160172f08 (diff) | |
Improve a bit php8 compatibility
PHP changed the way it exposes if a function
has variadic arguments or not, hence why we need
yet an other ifdef.
Diffstat (limited to 'src/sp_disabled_functions.c')
| -rw-r--r-- | src/sp_disabled_functions.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index c088f20..9e64993 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -352,7 +352,12 @@ static void should_disable(zend_execute_data* execute_data, | |||
| 352 | if (config_node->param || config_node->r_param || | 352 | if (config_node->param || config_node->r_param || |
| 353 | (config_node->pos != -1)) { | 353 | (config_node->pos != -1)) { |
| 354 | if (!builtin_param && | 354 | if (!builtin_param && |
| 355 | execute_data->func->op_array.arg_info->is_variadic) { | 355 | #if PHP_VERSION_ID >= 80000 |
| 356 | ZEND_ARG_IS_VARIADIC(execute_data->func->op_array.arg_info) | ||
| 357 | #else | ||
| 358 | execute_data->func->op_array.arg_info->is_variadic | ||
| 359 | #endif | ||
| 360 | ){ | ||
| 356 | sp_log_warn( | 361 | sp_log_warn( |
| 357 | "disable_function", | 362 | "disable_function", |
| 358 | "Snuffleupagus doesn't support variadic functions yet, sorry. " | 363 | "Snuffleupagus doesn't support variadic functions yet, sorry. " |
