diff options
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; } |