From: Ard Biesheuvel Date: Fri, 4 Jun 2004 16:54:14 +0000 (+0000) Subject: Fixed unregistered bug [crash in http_build_query()] X-Git-Tag: php-5.0.0RC3~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c97bc2632f6e44fabddbf847be4ec6a17ac4783;p=php Fixed unregistered bug [crash in http_build_query()] --- diff --git a/ext/standard/http.c b/ext/standard/http.c index 7cd909120d..0464dced4c 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -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; }