X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_build_query.c;h=a97d3431332326b81516fad7ae907f7f9011f3c2;hp=689204cca6c706b6b83fcdf3bf133316fbb880a5;hb=5f802478389681e57d231f4c19361f84c7005636;hpb=5adb6327e71fc1164c4a20323fa6a070e688416b 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) {