From ced1c6b8d243d1f90904360ff7041f3dde6d132c Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 4 Aug 2026 21:24:27 +0100 Subject: [PATCH 1/3] Replace zend_parse_parameter() call to zend_parse_arg_long() --- src/php/handlers/php_seq_handlers.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/php/handlers/php_seq_handlers.c b/src/php/handlers/php_seq_handlers.c index 6f6ec5b..efc33e8 100644 --- a/src/php/handlers/php_seq_handlers.c +++ b/src/php/handlers/php_seq_handlers.c @@ -76,15 +76,18 @@ static void php_ds_seq_unset_dimension ds_seq_separate(&php_obj->seq); ds_seq_t *seq = php_obj->seq; zend_long index = 0; + bool is_null = false; ZVAL_DEREF(offset); if (Z_TYPE_P(offset) == IS_LONG) { index = Z_LVAL_P(offset); - } else { - if (zend_parse_parameter(ZEND_PARSE_PARAMS_QUIET, 1, offset, "l", &index) == FAILURE) { - return; - } + } else if (Z_TYPE_P(offset) == IS_NULL) { + index = 0; + php_docref_error(E_DEPRECATED, "Using null as array offset is deprecated"); + } else if (!zend_parse_arg_long(offset, &index, &is_null, false, 0) { + INTEGER_INDEX_REQUIRED(z); + return; } if (ds_seq_index_exists(seq, index)) { From f972716ad2999375272c090ec3168b3cacd61e02 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Wed, 12 Aug 2026 13:48:52 +0100 Subject: [PATCH 2/3] Fixes --- src/php/handlers/php_seq_handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/php/handlers/php_seq_handlers.c b/src/php/handlers/php_seq_handlers.c index efc33e8..b367b5d 100644 --- a/src/php/handlers/php_seq_handlers.c +++ b/src/php/handlers/php_seq_handlers.c @@ -85,8 +85,8 @@ static void php_ds_seq_unset_dimension } else if (Z_TYPE_P(offset) == IS_NULL) { index = 0; php_docref_error(E_DEPRECATED, "Using null as array offset is deprecated"); - } else if (!zend_parse_arg_long(offset, &index, &is_null, false, 0) { - INTEGER_INDEX_REQUIRED(z); + } else if (!zend_parse_arg_long(offset, &index, &is_null, false, 0)) { + INTEGER_INDEX_REQUIRED(offset); return; } From 9f9790f292bd77ef6b0239eed84e7646c8453293 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Wed, 12 Aug 2026 14:35:42 +0100 Subject: [PATCH 3/3] Another fix --- src/php/handlers/php_seq_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/handlers/php_seq_handlers.c b/src/php/handlers/php_seq_handlers.c index b367b5d..f8417c4 100644 --- a/src/php/handlers/php_seq_handlers.c +++ b/src/php/handlers/php_seq_handlers.c @@ -84,7 +84,7 @@ static void php_ds_seq_unset_dimension } else if (Z_TYPE_P(offset) == IS_NULL) { index = 0; - php_docref_error(E_DEPRECATED, "Using null as array offset is deprecated"); + php_docref_error(NULL, E_DEPRECATED, "Using null as array offset is deprecated"); } else if (!zend_parse_arg_long(offset, &index, &is_null, false, 0)) { INTEGER_INDEX_REQUIRED(offset); return;