X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_querystring.c;h=391bccf675f0534d36f079b2bb75b892a1434f9c;hp=c15b2dda187e2d2f2b8739b892e265e71cfd1fa1;hb=82923890d9ce44a0642ac2f5ea0cb343aaf50fe3;hpb=270b6b653063c151409b0303abedd68f2ca2221e diff --git a/src/php_http_querystring.c b/src/php_http_querystring.c index c15b2dd..391bccf 100644 --- a/src/php_http_querystring.c +++ b/src/php_http_querystring.c @@ -63,7 +63,7 @@ static inline void php_http_querystring_str(zval *instance, zval *return_value) } } -static inline void php_http_querystring_get(zval *instance, int type, char *name, uint name_len, zval *defval, zend_bool del, zval *return_value) +static inline void php_http_querystring_get(zval *instance, int type, char *name, uint32_t name_len, zval *defval, zend_bool del, zval *return_value) { zval *arrval, qarray_tmp, *qarray = zend_read_property(php_http_querystring_class_entry, instance, ZEND_STRL("queryArray"), 0, &qarray_tmp); @@ -384,9 +384,11 @@ PHP_METHOD(HttpQueryString, getGlobalInstance) ZVAL_STRING(&tmp, "queryArray"); qa = Z_OBJ_HT_P(return_value)->get_property_ptr_ptr(return_value, &tmp, BP_VAR_RW, NULL); - ZVAL_NEW_REF(qa, _GET); zval_ptr_dtor(&tmp); + ZVAL_NEW_REF(_GET, _GET); + ZVAL_COPY(qa, _GET); + zend_update_static_property(php_http_querystring_class_entry, ZEND_STRL("instance"), return_value); } else { php_http_throw(unexpected_val, "Could not acquire reference to superglobal GET array");