X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_querystring.c;h=ead598bbb9a4f19756906c06a6cb9ec6fa463c0c;hp=5f6748263349951d6155ed5daee7634f173ce082;hb=2e9ac0202f2c5f1cb94e0afd4b66c1c35c316284;hpb=dedad9f35cbeaee56e7cca145e378cc6548198e3 diff --git a/php_http_querystring.c b/php_http_querystring.c index 5f67482..ead598b 100644 --- a/php_http_querystring.c +++ b/php_http_querystring.c @@ -6,17 +6,14 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2010, Michael Wallner | + | Copyright (c) 2004-2011, Michael Wallner | +--------------------------------------------------------------------+ */ -/* $Id$ */ +#include "php_http_api.h" -#include "php_http.h" - -#include
+#include #include -#include #ifdef PHP_HTTP_HAVE_ICONV # undef PHP_ATOM_INC @@ -302,7 +299,7 @@ PHP_MINIT_FUNCTION(http_querystring) { PHP_HTTP_REGISTER_CLASS(http, QueryString, http_querystring, php_http_object_class_entry, 0); - zend_class_implements(php_http_querystring_class_entry TSRMLS_CC, 4, php_http_fluently_callable_class_entry, zend_ce_serializable, zend_ce_arrayaccess, zend_ce_aggregate); + zend_class_implements(php_http_querystring_class_entry TSRMLS_CC, 3, zend_ce_serializable, zend_ce_arrayaccess, zend_ce_aggregate); zend_declare_property_null(php_http_querystring_class_entry, ZEND_STRL("instance"), (ZEND_ACC_STATIC|ZEND_ACC_PRIVATE) TSRMLS_CC); zend_declare_property_null(php_http_querystring_class_entry, ZEND_STRL("queryArray"), ZEND_ACC_PRIVATE TSRMLS_CC); @@ -350,7 +347,7 @@ static inline void php_http_querystring_get(zval *this_ptr, int type, char *name { zval **arrval, *qarray = zend_read_property(php_http_querystring_class_entry, getThis(), ZEND_STRL("queryArray"), 0 TSRMLS_CC); - if ((Z_TYPE_P(qarray) == IS_ARRAY) && (SUCCESS == zend_hash_find(Z_ARRVAL_P(qarray), name, name_len + 1, (void *) &arrval))) { + if ((Z_TYPE_P(qarray) == IS_ARRAY) && (SUCCESS == zend_symtable_find(Z_ARRVAL_P(qarray), name, name_len + 1, (void *) &arrval))) { if (type) { zval *value = php_http_ztyp(type, *arrval); RETVAL_ZVAL(value, 1, 1); @@ -599,7 +596,7 @@ PHP_METHOD(HttpQueryString, offsetGet) zval *qa = zend_read_property(php_http_querystring_class_entry, getThis(), ZEND_STRL("queryArray"), 0 TSRMLS_CC); if (Z_TYPE_P(qa) == IS_ARRAY - && SUCCESS == zend_hash_find(Z_ARRVAL_P(qa), offset_str, offset_len + 1, (void *) &value) + && SUCCESS == zend_symtable_find(Z_ARRVAL_P(qa), offset_str, offset_len + 1, (void *) &value) ) { RETVAL_ZVAL(*value, 1, 0); } @@ -634,7 +631,7 @@ PHP_METHOD(HttpQueryString, offsetExists) zval *qa = zend_read_property(php_http_querystring_class_entry, getThis(), ZEND_STRL("queryArray"), 0 TSRMLS_CC); if (Z_TYPE_P(qa) == IS_ARRAY - && SUCCESS == zend_hash_find(Z_ARRVAL_P(qa), offset_str, offset_len + 1, (void *) &value) + && SUCCESS == zend_symtable_find(Z_ARRVAL_P(qa), offset_str, offset_len + 1, (void *) &value) && Z_TYPE_PP(value) != IS_NULL ) { RETURN_TRUE;