Skip to content

Commit

Permalink
Fixed unregistered bug [crash in http_build_query()]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ard Biesheuvel committed Jun 4, 2004
1 parent f9cec02 commit 2c97bc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/standard/http.c
Expand Up @@ -55,7 +55,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
(key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT;
zend_hash_move_forward(ht)
) {
if (key_len && key[key_len-1] == '\0') {
if (key_type == HASH_KEY_IS_STRING && key_len && key[key_len-1] == '\0') {
/* We don't want that trailing NULL */
key_len -= 1;
}
Expand Down

0 comments on commit 2c97bc2

Please sign in to comment.