From 170476d9ea72e004341d2034715199f21ae68ba9 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Sat, 10 Jan 2004 09:27:52 +0000 Subject: [PATCH] BUGFIX: server006.phpt --- ext/soap/soap.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 8755754208..624cf5c167 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1088,10 +1088,17 @@ PHP_METHOD(soapserver, handle) /* If new session or something wierd happned */ if (soap_obj == NULL) { zval *tmp_soap; + char *class_name; + int class_name_len; + MAKE_STD_ZVAL(tmp_soap); object_init_ex(tmp_soap, service->soap_class.ce); + /* Call constructor */ - if (zend_hash_exists(&Z_OBJCE_P(tmp_soap)->function_table, service->soap_class.ce->name, strlen(service->soap_class.ce->name) + 1)) { + class_name_len = strlen(service->soap_class.ce->name); + class_name = emalloc(class_name_len+1); + memcpy(class_name, service->soap_class.ce->name,class_name_len+1); + if (zend_hash_exists(&Z_OBJCE_P(tmp_soap)->function_table, php_strtolower(class_name, class_name_len), class_name_len+1)) { zval c_ret, constructor; INIT_ZVAL(c_ret); @@ -1104,6 +1111,7 @@ PHP_METHOD(soapserver, handle) zval_dtor(&constructor); zval_dtor(&c_ret); } + efree(class_name); #if HAVE_PHP_SESSION /* If session then update session hash with new object */ if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { -- 2.50.1