X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_querystring.c;h=77df3215dfaa7daaf6fc009944b050eda8ea12dd;hp=67df721b9015729fbbb030d903614ff0f92eef88;hb=7b6175452cb0a9154da31dd571c1425951ec6547;hpb=da63feb69bdf005bdf4b6657513c782a863bde70 diff --git a/php_http_querystring.c b/php_http_querystring.c index 67df721..77df321 100644 --- a/php_http_querystring.c +++ b/php_http_querystring.c @@ -349,13 +349,8 @@ PHP_METHOD(HttpQueryString, getGlobalInstance) if (Z_TYPE_P(instance) != IS_OBJECT) { zval *_GET = NULL; - zend_string *zs = zend_string_init("_GET", lenof("_GET"), 0); - zend_is_auto_global(zs); - - if ((_GET = zend_hash_find(&EG(symbol_table).ht, zs)) - && (Z_TYPE_P(_GET) == IS_ARRAY) - ) { + if ((_GET = php_http_env_get_superglobal(ZEND_STRL("_GET")))) { zval new_instance; ZVAL_OBJ(&new_instance, php_http_querystring_object_new(php_http_querystring_class_entry)); @@ -368,8 +363,6 @@ PHP_METHOD(HttpQueryString, getGlobalInstance) } else { php_http_throw(unexpected_val, "Could not acquire reference to superglobal GET array", NULL); } - - zend_string_release(zs); } RETVAL_ZVAL_FAST(instance);