Skip to content

Commit 3ab4668

Browse files
committed
PHP 8.6: WRONG_PARAM_COUNT has been removed in favour of zend_wrong_param_count() + RETURN_THROWS()
1 parent c0f21bb commit 3ab4668

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/develop/php_functions.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ PHP_FUNCTION(xdebug_var_dump)
4747
args = safe_emalloc(argc, sizeof(zval), 0);
4848
if (ZEND_NUM_ARGS() == 0 || zend_get_parameters_array_ex(argc, args) == FAILURE) {
4949
efree(args);
50-
WRONG_PARAM_COUNT;
50+
zend_wrong_param_count();
51+
RETURN_THROWS();
5152
}
5253

5354
for (i = 0; i < argc; i++) {
@@ -86,7 +87,8 @@ PHP_FUNCTION(xdebug_debug_zval)
8687
args = safe_emalloc(argc, sizeof(zval), 0);
8788
if (ZEND_NUM_ARGS() == 0 || zend_get_parameters_array_ex(argc, args) == FAILURE) {
8889
efree(args);
89-
WRONG_PARAM_COUNT;
90+
zend_wrong_param_count();
91+
RETURN_THROWS();
9092
}
9193

9294
if (!(ZEND_CALL_INFO(EG(current_execute_data)->prev_execute_data) & ZEND_CALL_HAS_SYMBOL_TABLE)) {
@@ -151,7 +153,8 @@ PHP_FUNCTION(xdebug_debug_zval_stdout)
151153
args = safe_emalloc(argc, sizeof(zval), 0);
152154
if (ZEND_NUM_ARGS() == 0 || zend_get_parameters_array_ex(argc, args) == FAILURE) {
153155
efree(args);
154-
WRONG_PARAM_COUNT;
156+
zend_wrong_param_count();
157+
RETURN_THROWS();
155158
}
156159

157160
if (!(ZEND_CALL_INFO(EG(current_execute_data)->prev_execute_data) & ZEND_CALL_HAS_SYMBOL_TABLE)) {

0 commit comments

Comments
 (0)