- FOREACH_HASH_KEYLENVAL(pos, &list->cookies, key, keylen, idx, val) {
- if (key && keylen) {
- append_encoded(&buf, key, keylen-1, Z_STRVAL_PP(val), Z_STRLEN_PP(val));
- key = NULL;
+ FOREACH_HASH_KEYVAL(pos, &list->cookies, key, val) {
+ if (key.type == HASH_KEY_IS_STRING && key.len) {
+ append_encoded(&buf, key.str, key.len-1, Z_STRVAL_PP(val), Z_STRLEN_PP(val));