Skip to content

Commit

Permalink
explicitly allow null to avoid warning in 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed Mar 10, 2021
1 parent 4776c4e commit f8fc530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/php_http_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,14 +1249,14 @@ PHP_METHOD(HttpParams, offsetSet)
zend_string *name;
zval zparams_tmp, *zparam, *zparams, *nvalue;

if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "Sz", &name, &nvalue)) {
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "S!z", &name, &nvalue)) {
return;
}

zparams = zend_read_property(php_http_params_class_entry, Z_OBJ_P(ZEND_THIS), ZEND_STRL("params"), 0, &zparams_tmp);
convert_to_array(zparams);

if (name->len) {
if (name && name->len) {
if (Z_TYPE_P(nvalue) == IS_ARRAY) {
if ((zparam = zend_symtable_find(Z_ARRVAL_P(zparams), name))) {
convert_to_array(zparam);
Expand Down

0 comments on commit f8fc530

Please sign in to comment.