diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-02-10 10:04:30 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-02-10 10:04:30 +0400 |
commit | f4cfaf36e23ca47da3e352e1c60909104c059647 (patch) | |
tree | 0db3e2a323b12c5bbf1a958c857f92eb58c240d1 /ext/soap/php_encoding.c | |
parent | 89a9acea1f9d821a9805b3857bf4febbba08690d (diff) | |
download | php-git-f4cfaf36e23ca47da3e352e1c60909104c059647.tar.gz |
Use better data structures (incomplete)
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r-- | ext/soap/php_encoding.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 12f23bf0e2..36d0f80249 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2273,8 +2273,11 @@ static void add_xml_array_elements(xmlNodePtr xmlParam, static inline int array_num_elements(HashTable* ht) { - if (ht->pListTail && ht->pListTail->nKeyLength == 0) { - return ht->pListTail->h-1; + if (ht->nNumUsed && + ht->arData[ht->nNumUsed-1].xData && + ht->arData[ht->nNumUsed-1].nKeyLength == 0) { + + return ht->arData[ht->nNumUsed-1].h - 1; } return 0; } |