X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_querystring_api.c;h=e6b557adc3f0d5248b3283d761f4734e047f1836;hp=4fc3986313bbd2e9a4272f952cf5239730efa486;hb=14c5fd32278ae1d4c127acdde4d8f63eb87cab60;hpb=5ba379899fb1e05ede73674dc010ce8846e051c2 diff --git a/http_querystring_api.c b/http_querystring_api.c index 4fc3986..e6b557a 100644 --- a/http_querystring_api.c +++ b/http_querystring_api.c @@ -161,6 +161,11 @@ static inline int _http_querystring_modify_array(zval *qarray, zval *params TSRM static inline int _http_querystring_modify_array_ex(zval *qarray, int key_type, char *key, int keylen, ulong idx, zval *params_entry TSRMLS_DC) { zval **qarray_entry; + + /* ensure array type */ + if (Z_TYPE_P(qarray) != IS_ARRAY) { + convert_to_array(qarray); + } /* delete */ if (Z_TYPE_P(params_entry) == IS_NULL) {