diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-07-10 07:41:33 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-07-10 07:41:33 +0000 |
commit | 795a482a48b4b72319d3c6911d021a45648da02b (patch) | |
tree | f220989052c54e143195b484d04279f2e7d8c7f8 /ext/soap/php_packet_soap.c | |
parent | 098d3d2b0274aafa8df56bd528ac36c4f80a977d (diff) | |
download | php-git-795a482a48b4b72319d3c6911d021a45648da02b.tar.gz |
Fixed bug #38005 (SoapFault faultstring doesn't follow encoding rules)
Diffstat (limited to 'ext/soap/php_packet_soap.c')
-rw-r--r-- | ext/soap/php_packet_soap.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index 4fb45a6413..92d9df5161 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -191,12 +191,16 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction tmp = get_node(fault->children,"faultstring"); if (tmp != NULL && tmp->children != NULL) { - faultstring = tmp->children->content; + zval *zv = master_to_zval(get_conversion(IS_STRING), tmp); + faultstring = Z_STRVAL_P(zv); + FREE_ZVAL(zv); } tmp = get_node(fault->children,"faultactor"); if (tmp != NULL && tmp->children != NULL) { - faultactor = tmp->children->content; + zval *zv = master_to_zval(get_conversion(IS_STRING), tmp); + faultactor = Z_STRVAL_P(zv); + FREE_ZVAL(zv); } tmp = get_node(fault->children,"detail"); @@ -217,7 +221,9 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction /* TODO: lang attribute */ tmp = get_node(tmp->children,"Text"); if (tmp != NULL && tmp->children != NULL) { - faultstring = tmp->children->content; + zval *zv = master_to_zval(get_conversion(IS_STRING), tmp); + faultstring = Z_STRVAL_P(zv); + FREE_ZVAL(zv); } } @@ -227,6 +233,12 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction } } add_soap_fault(this_ptr, faultcode, faultstring, faultactor, details TSRMLS_CC); + if (faultstring) { + efree(faultstring); + } + if (faultactor) { + efree(faultactor); + } #ifdef ZEND_ENGINE_2 if (details) { details->refcount--; |