X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_build_query.c;h=a97d3431332326b81516fad7ae907f7f9011f3c2;hb=9c566f3419df4dc202540b2e9ab042bef72263b7;hp=689204cca6c706b6b83fcdf3bf133316fbb880a5;hpb=9949be4659856993b6f3668c87cdcf158f6c2ddf;p=m6w6%2Fext-http diff --git a/http_build_query.c b/http_build_query.c index 689204c..a97d343 100644 --- a/http_build_query.c +++ b/http_build_query.c @@ -60,6 +60,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, key_len -= 1; } +#ifdef ZEND_ENGINE_2 /* handling for private & protected object properties */ if (key && *key == '\0' && type != NULL) { char *tmp; @@ -72,6 +73,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, zend_unmangle_property_name(key, &tmp, &key); key_len = strlen(key); } +#endif if (zend_hash_get_current_data_ex(ht, (void **)&zdata, NULL) == FAILURE || !zdata || !(*zdata)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error traversing form data array."); @@ -127,8 +129,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, *p = '\0'; } ht->nApplyCount++; - php_url_encode_hash_ex(HASH_OF(*zdata), formstr, NULL, 0, newprefix, newprefix_len, "]", 1, -(Z_TYPE_PP(zdata) == IS_OBJECT ? *zdata : NULL) TSRMLS_CC); + php_url_encode_hash_ex(HASH_OF(*zdata), formstr, NULL, 0, newprefix, newprefix_len, "]", 1, (Z_TYPE_PP(zdata) == IS_OBJECT ? *zdata : NULL) TSRMLS_CC); ht->nApplyCount--; efree(newprefix); } else if (Z_TYPE_PP(zdata) == IS_NULL || Z_TYPE_PP(zdata) == IS_RESOURCE) {