From 5f802478389681e57d231f4c19361f84c7005636 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 9 Feb 2005 16:59:22 +0000 Subject: [PATCH] * fix PHP4 build --- http_build_query.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) { -- 2.30.2