]> granicus.if.org Git - php/commitdiff
- Tiny piece of unicode support
authorMarcus Boerger <helly@php.net>
Sun, 23 Jul 2006 06:05:23 +0000 (06:05 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 23 Jul 2006 06:05:23 +0000 (06:05 +0000)
ext/standard/http.c

index 9fd6723cdca1c810870ae3663b3b3efbbb826366..fe37e4c075edece56d128f376b54f77bc611e747 100644 (file)
@@ -59,7 +59,8 @@ 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_type == HASH_KEY_IS_STRING && key_len && key.s[key_len-1] == '\0') {
+               if ((key_type == HASH_KEY_IS_STRING || key_type == HASH_KEY_IS_UNICODE)
+               && key_len && key.s[key_len-1] == '\0') {
                        /* We don't want that trailing NULL */
                        key_len -= 1;
                }