From: Michael Wallner Date: Wed, 10 Mar 2021 09:17:01 +0000 (+0100) Subject: explicitly allow null to avoid warning in 8.1 X-Git-Tag: v4.1.0~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f8fc5308928741fefb62510991b5a31cc27ab432;p=m6w6%2Fext-http explicitly allow null to avoid warning in 8.1 --- diff --git a/src/php_http_params.c b/src/php_http_params.c index 44f01c3..8ac4f8f 100644 --- a/src/php_http_params.c +++ b/src/php_http_params.c @@ -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);