From: Zeev Suraski Date: Sat, 31 Jul 1999 20:21:07 +0000 (+0000) Subject: More IMAP fixes X-Git-Tag: php-4.0b2~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2dda8d7f9760ee735c5e8829599c4c88a87e0628;p=php More IMAP fixes --- diff --git a/ext/imap/imap.c b/ext/imap/imap.c index d2a9f15de6..82bef45ad1 100644 --- a/ext/imap/imap.c +++ b/ext/imap/imap.c @@ -182,12 +182,27 @@ MAILSTREAM *mail_close_it (pils *imap_le_struct) inline int add_assoc_object(pval *arg, char *key, pval *tmp) { - return _php3_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(pval *), NULL); + HashTable *symtable; + + if (arg->type == IS_OBJECT) { + symtable = arg->value.obj.properties; + } else { + symtable = arg->value.ht; + } + return _php3_hash_update(symtable, key, strlen(key)+1, (void *) &tmp, sizeof(pval *), NULL); } inline int add_next_index_object(pval *arg, pval *tmp) { - return _php3_hash_next_index_insert( arg->value.ht, (void *) &tmp, sizeof(pval *), NULL); + HashTable *symtable; + + if (arg->type == IS_OBJECT) { + symtable = arg->value.obj.properties; + } else { + symtable = arg->value.ht; + } + + return _php3_hash_next_index_insert(symtable, (void *) &tmp, sizeof(pval *), NULL); }