diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-05-02 08:22:13 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-05-02 08:22:13 +0000 |
commit | 3721cb9d8d25054b657a4d476ceb8dcec935e46c (patch) | |
tree | d1d3eab7a0b878c96463757a5385a0ab32a7d3f3 /ext/soap/php_encoding.c | |
parent | f409fcd02ab1c28b02096577e14060e7195c7aa3 (diff) | |
download | php-git-3721cb9d8d25054b657a4d476ceb8dcec935e46c.tar.gz |
Fixed bug #41097 (ext/soap returning associative array as indexed without using WSDL)
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r-- | ext/soap/php_encoding.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 2ae06a768a..083b50ae40 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -3356,8 +3356,12 @@ static int is_map(zval *array) int i, count = zend_hash_num_elements(Z_ARRVAL_P(array)); zend_hash_internal_pointer_reset(Z_ARRVAL_P(array)); - for (i = 0;i < count;i++) { - if (zend_hash_get_current_key_type(Z_ARRVAL_P(array)) == HASH_KEY_IS_STRING) { + for (i = 0; i < count; i++) { + char *str_index; + ulong num_index; + + if (zend_hash_get_current_key(Z_ARRVAL_P(array), &str_index, &num_index, 0) == HASH_KEY_IS_STRING || + num_index != i) { return TRUE; } zend_hash_move_forward(Z_ARRVAL_P(array)); |