mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
- Tiny piece of unicode support
This commit is contained in:
parent
ea14497546
commit
f55c2d0885
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
(key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT;
|
||||||
zend_hash_move_forward(ht)
|
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 */
|
/* We don't want that trailing NULL */
|
||||||
key_len -= 1;
|
key_len -= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue