Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,8 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
break;

case 'A':
zend_error(E_DEPRECATED, "ZPP spec A is deprecated");
ZEND_FALLTHROUGH;
case 'a':
{
zval **p = va_arg(*va, zval **);
Expand All @@ -936,6 +938,8 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
break;

case 'H':
zend_error(E_DEPRECATED, "ZPP spec H is deprecated");
ZEND_FALLTHROUGH;
case 'h':
{
HashTable **p = va_arg(*va, HashTable **);
Expand Down
23 changes: 14 additions & 9 deletions ext/spl/spl_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,9 +996,12 @@ PHP_METHOD(ArrayObject, __construct)
return; /* nothing to do */
}

if (zend_parse_parameters(ZEND_NUM_ARGS(), "|AlC", &array, &ar_flags, &ce_get_iterator) == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_START(0, 3)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY_OR_OBJECT(array)
Z_PARAM_LONG(ar_flags)
Z_PARAM_CLASS(ce_get_iterator)
ZEND_PARSE_PARAMETERS_END();

intern = Z_SPLARRAY_P(object);

Expand Down Expand Up @@ -1073,9 +1076,9 @@ PHP_METHOD(ArrayObject, exchangeArray)
zval *object = ZEND_THIS, *array;
spl_array_object *intern = Z_SPLARRAY_P(object);

if (zend_parse_parameters(ZEND_NUM_ARGS(), "A", &array) == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT(array)
ZEND_PARSE_PARAMETERS_END();

if (intern->nApplyCount > 0) {
zend_throw_error(NULL, "Modification of ArrayObject during sorting is prohibited");
Expand Down Expand Up @@ -1654,9 +1657,11 @@ PHP_METHOD(ArrayIterator, __construct)
return; /* nothing to do */
}

if (zend_parse_parameters(ZEND_NUM_ARGS(), "|Al", &array, &ar_flags) == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_START(0, 2)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY_OR_OBJECT(array)
Z_PARAM_LONG(ar_flags)
ZEND_PARSE_PARAMETERS_END();

intern = Z_SPLARRAY_P(object);

Expand Down
Loading