From 2709d4f18be71d82d632a61fc6bc47a9296d91a7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 15 May 2014 22:51:46 +0400 Subject: [PATCH] Buffer has to be reallocated on each loop iteration --- ext/soap/soap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 570b1ad640..72c1e34a02 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2981,7 +2981,8 @@ PHP_METHOD(SoapClient, __getTypes) if (sdl->types) { ZEND_HASH_FOREACH_PTR(sdl->types, type) { type_to_string(type, &buf, 0); - add_next_index_str(return_value, buf.s); + add_next_index_stringl(return_value, buf.s->val, buf.s->len); + smart_str_free(&buf); } ZEND_HASH_FOREACH_END(); } } -- 2.50.1