summaryrefslogtreecommitdiff
path: root/ext/soap/php_encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r--ext/soap/php_encoding.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 97191652d6..9e554a9f5a 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -3134,11 +3134,9 @@ static xmlNodePtr to_xml_any(encodeTypePtr type, zval *data, int style, xmlNodeP
if (Z_TYPE_P(data) == IS_STRING) {
ret = xmlNewTextLen(BAD_CAST(Z_STRVAL_P(data)), Z_STRLEN_P(data));
} else {
- zval tmp;
-
- ZVAL_STR(&tmp, zval_get_string(data));
- ret = xmlNewTextLen(BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
- zval_dtor(&tmp);
+ zend_string *tmp = zval_get_string(data);
+ ret = xmlNewTextLen(BAD_CAST(tmp->val), tmp->len);
+ zend_string_release(tmp);
}
ret->name = xmlStringTextNoenc;