]> granicus.if.org Git - php/commitdiff
BUGFIX: server006.phpt
authorDmitry Stogov <dmitry@php.net>
Sat, 10 Jan 2004 09:27:52 +0000 (09:27 +0000)
committerDmitry Stogov <dmitry@php.net>
Sat, 10 Jan 2004 09:27:52 +0000 (09:27 +0000)
ext/soap/soap.c

index 8755754208cb86b765080b315218f1d451c0b839..624cf5c167c2560c79c9113497ac804c5ff8bd02 100644 (file)
@@ -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) {