diff options
author | Zeev Suraski <zeev@php.net> | 1999-07-31 20:21:07 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-07-31 20:21:07 +0000 |
commit | 2dda8d7f9760ee735c5e8829599c4c88a87e0628 (patch) | |
tree | 9591c21f5449ed7381e3b08c4c84c3e840028cce /ext/imap | |
parent | 2639ab7d03e14fc4805a09562ea4f3a9c0364c02 (diff) | |
download | php-git-2dda8d7f9760ee735c5e8829599c4c88a87e0628.tar.gz |
More IMAP fixes
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/imap.c | 19 |
1 files changed, 17 insertions, 2 deletions
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); } |