diff options
Diffstat (limited to 'ext/standard/http.c')
-rw-r--r-- | ext/standard/http.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/standard/http.c b/ext/standard/http.c index 0b5aea314b..2b1c1390bd 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -56,7 +56,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, arg_sep_len = strlen(arg_sep); for (zend_hash_internal_pointer_reset(ht); - (key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT; + (key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTENT; zend_hash_move_forward(ht) ) { if (key_type == HASH_KEY_IS_STRING && key_len && key[key_len-1] == '\0') { @@ -69,12 +69,11 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *tmp; zend_object *zobj = zend_objects_get_address(type TSRMLS_CC); - if (zend_check_property_access(zobj, key, key_len-1 TSRMLS_CC) != SUCCESS) { + if (zend_check_property_access(zobj, key, key_len TSRMLS_CC) != SUCCESS) { /* private or protected property access outside of the class */ continue; } - zend_unmangle_property_name(key, key_len-1, &tmp, (const char**)&key); - key_len = strlen(key); + zend_unmangle_property_name_ex(key, key_len, &tmp, (const char**)&key, &key_len); } if (zend_hash_get_current_data_ex(ht, (void **)&zdata, NULL) == FAILURE || !zdata || !(*zdata)) { |