dims[0] = i;
el = &data;
for (i = 1; i < dimension; i++) {
- if (el != NULL && Z_TYPE_PP(el) == IS_ARRAY && Z_ARRVAL_PP(el)->pListHead) {
- el = (zval**)Z_ARRVAL_PP(el)->pListHead->pData;
+ if (el != NULL && Z_TYPE_PP(el) == IS_ARRAY &&
+ zend_hash_num_elements(Z_ARRVAL_PP(el)) > 0) {
+ zend_hash_internal_pointer_reset(Z_ARRVAL_PP(el));
+ zend_hash_get_current_data(Z_ARRVAL_PP(el), (void**)&el);
if (Z_TYPE_PP(el) == IS_ARRAY) {
dims[i] = zend_hash_num_elements(Z_ARRVAL_PP(el));
} else {
if (sdl_type && sdl_type->elements &&
zend_hash_num_elements(sdl_type->elements) == 1 &&
- (elementType = *(sdlTypePtr*)sdl_type->elements->pListHead->pData) != NULL &&
+ (zend_hash_internal_pointer_reset(sdl_type->elements),
+ zend_hash_get_current_data(sdl_type->elements, (void**)&elementType) == SUCCESS) &&
+ (elementType = *(sdlTypePtr*)elementType) != NULL &&
elementType->encode && elementType->encode->details.type_str) {
element_type = elementType;
enc = elementType->encode;
}
} else if (sdl_type && sdl_type->elements &&
zend_hash_num_elements(sdl_type->elements) == 1 &&
- (elementType = *(sdlTypePtr*)sdl_type->elements->pListHead->pData) != NULL &&
+ (zend_hash_internal_pointer_reset(sdl_type->elements),
+ zend_hash_get_current_data(sdl_type->elements, (void**)&elementType) == SUCCESS) &&
+ (elementType = *(sdlTypePtr*)elementType) != NULL &&
elementType->encode && elementType->encode->details.type_str) {
element_type = elementType;
dims = get_position_12(dimension, (*ext)->val);
if (type->sdl_type && type->sdl_type->elements &&
zend_hash_num_elements(type->sdl_type->elements) == 1 &&
- (elementType = *(sdlTypePtr*)type->sdl_type->elements->pListHead->pData) != NULL &&
+ (zend_hash_internal_pointer_reset(type->sdl_type->elements),
+ zend_hash_get_current_data(type->sdl_type->elements, (void**)&elementType) == SUCCESS) &&
+ (elementType = *(sdlTypePtr*)elementType) != NULL &&
elementType->encode) {
enc = elementType->encode;
}
} else if (type->sdl_type && type->sdl_type->elements &&
zend_hash_num_elements(type->sdl_type->elements) == 1 &&
- (elementType = *(sdlTypePtr*)type->sdl_type->elements->pListHead->pData) != NULL &&
+ (zend_hash_internal_pointer_reset(type->sdl_type->elements),
+ zend_hash_get_current_data(type->sdl_type->elements, (void**)&elementType) == SUCCESS) &&
+ (elementType = *(sdlTypePtr*)elementType) != NULL &&
elementType->encode) {
enc = elementType->encode;
}
cmplen = strlen(content_type);
}
if (strncmp(content_type, "text/xml", cmplen) == 0 ||
- strncmp(content_type, "application/soap+xml", cmplen == 0)) {
+ strncmp(content_type, "application/soap+xml", cmplen) == 0) {
/*
if (strncmp(http_body, "<?xml", 5)) {
zval *err;
zval_dtor(return_value);
ZVAL_NULL(return_value);
} else if (param_count == 1) {
- zval *tmp = *(zval**)Z_ARRVAL_P(return_value)->pListHead->pData;
- tmp->refcount++;
+ zval **tmp;
+
+ zend_hash_internal_pointer_reset(Z_ARRVAL_P(return_value));
+ zend_hash_get_current_data(Z_ARRVAL_P(return_value), (void**)&tmp);
+ (*tmp)->refcount++;
zval_dtor(return_value);
- *return_value = *tmp;
- FREE_ZVAL(tmp);
+ *return_value = **tmp;
+ FREE_ZVAL(*tmp);
}
}
WSDL_CACHE_GET_INT(i, in);
if (i > 0) {
- elements = do_alloca((i+1) * sizeof(sdlTypePtr));
+ elements = emalloc((i+1) * sizeof(sdlTypePtr));
elements[0] = NULL;
type->elements = emalloc(sizeof(HashTable));
zend_hash_init(type->elements, i, NULL, delete_type, 0);
WSDL_CACHE_SKIP(1, in);
}
if (elements != NULL) {
- free_alloca(elements);
+ efree(elements);
}
}
close(f);
return NULL;
}
- buf = in = do_alloca(st.st_size);
+ buf = in = emalloc(st.st_size);
if (read(f, in, st.st_size) != st.st_size) {
close(f);
- free_alloca(in);
+ efree(in);
return NULL;
}
close(f);
if (strncmp(in,"wsdl",4) != 0 || in[4] != WSDL_CACHE_VERSION || in[5] != '\0') {
unlink(fn);
- free_alloca(buf);
+ efree(buf);
return NULL;
}
in += 6;
WSDL_CACHE_GET(old_t, time_t, &in);
if (old_t < t) {
unlink(fn);
- free_alloca(buf);
+ efree(buf);
return NULL;
}
WSDL_CACHE_GET_INT(i, &in);
if (i == 0 && strncmp(in, uri, i) != 0) {
unlink(fn);
- free_alloca(buf);
+ efree(buf);
return NULL;
}
WSDL_CACHE_SKIP(i, &in);
WSDL_CACHE_GET_INT(num_encoders, &in);
i = num_groups+num_types+num_elements;
- types = do_alloca((i+1)*sizeof(sdlTypePtr));
+ types = emalloc((i+1)*sizeof(sdlTypePtr));
types[0] = NULL;
while (i > 0) {
types[i] = emalloc(sizeof(sdlType));
while (enc->details.type != END_KNOWN_TYPES) {
i++; enc++;
}
- encoders = do_alloca((i+1)*sizeof(encodePtr));
+ encoders = emalloc((i+1)*sizeof(encodePtr));
i = num_encoders;
encoders[0] = NULL;
while (i > 0) {
/* deserialize bindings */
WSDL_CACHE_GET_INT(num_bindings, &in);
- bindings = do_alloca(num_bindings*sizeof(sdlBindingPtr));
+ bindings = emalloc(num_bindings*sizeof(sdlBindingPtr));
if (num_bindings > 0) {
sdl->bindings = emalloc(sizeof(HashTable));
zend_hash_init(sdl->bindings, num_bindings, NULL, delete_binding, 0);
/* deserialize functions */
WSDL_CACHE_GET_INT(num_func, &in);
zend_hash_init(&sdl->functions, num_func, NULL, delete_function, 0);
- functions = do_alloca(num_func*sizeof(sdlFunctionPtr));
+ functions = emalloc(num_func*sizeof(sdlFunctionPtr));
for (i = 0; i < num_func; i++) {
int binding_num, num_faults;
sdlFunctionPtr func = emalloc(sizeof(sdlFunction));
}
}
- free_alloca(functions);
- free_alloca(bindings);
- free_alloca(encoders);
- free_alloca(types);
- free_alloca(buf);
+ efree(functions);
+ efree(bindings);
+ efree(encoders);
+ efree(types);
+ efree(buf);
return sdl;
}
\r
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
\r
-CFG=php_soap - Win32 Debug\r
+CFG=php_soap - Win32 Debug_TS\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
!MESSAGE \r
-!MESSAGE NMAKE /f "php_soap.mak" CFG="php_soap - Win32 Debug"\r
+!MESSAGE NMAKE /f "php_soap.mak" CFG="php_soap - Win32 Debug_TS"\r
!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
!MESSAGE \r
-!MESSAGE "php_soap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "php_soap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "php_soap - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "php_soap - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE \r
\r
# Begin Project\r
MTL=midl.exe\r
RSC=rc.exe\r
\r
-!IF "$(CFG)" == "php_soap - Win32 Release"\r
+!IF "$(CFG)" == "php_soap - Win32 Release_TS"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release"\r
-# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Output_Dir "Release_TS"\r
+# PROP BASE Intermediate_Dir "Release_TS"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
+# PROP Output_Dir "Release_TS"\r
+# PROP Intermediate_Dir "Release_TS"\r
# PROP Ignore_Export_Lib 0\r
# PROP Target_Dir ""\r
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_SOAP_EXPORTS" /YX /FD /c\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib libxml2.lib wsock32.lib resolv.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS\php_soap.dll" /libpath:"..\..\\" /libpath:"..\..\..\libxml2-2.4.12\lib" /libpath:"..\..\Release_TS"\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib libxml2.lib wsock32.lib resolv.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS\php_soap.dll" /libpath:"..\..\\" /libpath:"..\..\..\libxml2-2.4.12\lib" /libpath:"..\..\Release_TS"\r
\r
-!ELSEIF "$(CFG)" == "php_soap - Win32 Debug"\r
+!ELSEIF "$(CFG)" == "php_soap - Win32 Debug_TS"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug"\r
-# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Output_Dir "Debug_TS"\r
+# PROP BASE Intermediate_Dir "Debug_TS"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
+# PROP Output_Dir "Debug_TS"\r
+# PROP Intermediate_Dir "Debug_TS"\r
# PROP Ignore_Export_Lib 0\r
# PROP Target_Dir ""\r
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_SOAP_EXPORTS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\..\libxml2-2.4.12\include" /I "..\..\bind" /D "WS" /D "_MBCS" /D "_USRDLL" /D "PHP_SOAP_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "ZTS" /D ZEND_DEBUG=1 /D "COMPILE_DL_SOAP" /FR"Release_TS/" /Fp"Release_TS/gd.pch" /YX /Fo"Release_TS/" /Fd"Release_TS/" /FD /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\..\libxml2-2.4.12\include" /I "..\..\bind" /D "WS" /D "_MBCS" /D "_USRDLL" /D "PHP_SOAP_EXPORTS" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "ZTS" /D ZEND_DEBUG=1 /D "COMPILE_DL_SOAP" /FR"Debug_TS/" /Fp"Debug_TS/soap.pch" /YX /Fo"Debug_TS/" /Fd"Debug_TS/" /FD /c\r
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib libxml2.lib wsock32.lib resolv.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS\php_soap.dll" /implib:"Release_TS/php_gd.lib" /pdbtype:sept /libpath:"..\..\\" /libpath:"..\..\..\libxml2-2.4.12\lib" /libpath:"..\..\Debug_TS"\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts_debug.lib libxml2.lib wsock32.lib resolv.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS\php_soap.dll" /pdbtype:sept /libpath:"..\..\\" /libpath:"..\..\..\libxml2-2.4.12\lib" /libpath:"..\..\Debug_TS"\r
# SUBTRACT LINK32 /pdb:none /incremental:no\r
\r
!ENDIF \r
\r
# Begin Target\r
\r
-# Name "php_soap - Win32 Release"\r
-# Name "php_soap - Win32 Debug"\r
+# Name "php_soap - Win32 Release_TS"\r
+# Name "php_soap - Win32 Debug_TS"\r
# Begin Group "Source Files"\r
\r
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
}
if (zend_hash_index_find(Z_OBJPROP_P(dom), 1, (void **)&addr) == FAILURE) {
- OAP_HEADER_CLASS
}
node = (xmlNodePtr)Z_LVAL_PP(addr);
zval **req_method, **query_string;
if (zend_hash_find(Z_ARRVAL_PP(server_vars), "REQUEST_METHOD", sizeof("REQUEST_METHOD"), (void **)&req_method) == SUCCESS) {
if (!strcmp(Z_STRVAL_PP(req_method), "GET") && zend_hash_find(Z_ARRVAL_PP(server_vars), "QUERY_STRING", sizeof("QUERY_STRING"), (void **)&query_string) == SUCCESS) {
- if (strstr(Z_STRVAL_PP(query_string), "wsdl") != NULL ||
- strstr(Z_STRVAL_PP(query_string), "WSDL") != NULL) {
+ if (stricmp(Z_STRVAL_PP(query_string), "wsdl") == 0) {
if (service->sdl) {
/*
char *hdr = emalloc(sizeof("Location: ")+strlen(service->sdl->source));
}
/* Find the soap object and assign */
- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS &&
+ Z_TYPE_PP(tmp_soap) == IS_OBJECT &&
+ Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) {
soap_obj = *tmp_soap;
}
}
/* 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 */
- 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)) {
+#ifdef ZEND_ENGINE_2
+ if (zend_hash_exists(&Z_OBJCE_P(tmp_soap)->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME))) {
zval c_ret, constructor;
INIT_ZVAL(c_ret);
INIT_ZVAL(constructor);
- ZVAL_STRING(&constructor, service->soap_class.ce->name, 1);
+ ZVAL_STRING(&constructor, ZEND_CONSTRUCTOR_FUNC_NAME, 1);
if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv TSRMLS_CC) == FAILURE) {
php_error(E_ERROR, "Error calling constructor");
}
-#ifdef ZEND_ENGINE_2
- if (EG(exception) &&
- Z_TYPE_P(EG(exception)) == IS_OBJECT &&
- Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
- soap_server_fault_ex(function, EG(exception), NULL TSRMLS_CC);
+ if (EG(exception)) {
+ if (Z_TYPE_P(EG(exception)) == IS_OBJECT &&
+ Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
+ soap_server_fault_ex(function, EG(exception), NULL TSRMLS_CC);
+ } else {
+ zend_exception_error(EG(exception) TSRMLS_CC);
+ }
}
-#endif
zval_dtor(&constructor);
zval_dtor(&c_ret);
+ } else {
+#else
+ {
+#endif
+ int class_name_len = strlen(service->soap_class.ce->name);
+ char *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);
+ INIT_ZVAL(constructor);
+
+ ZVAL_STRING(&constructor, service->soap_class.ce->name, 1);
+ if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv TSRMLS_CC) == FAILURE) {
+ php_error(E_ERROR, "Error calling constructor");
+ }
+#ifdef ZEND_ENGINE_2
+ if (EG(exception)) {
+ if (Z_TYPE_P(EG(exception)) == IS_OBJECT &&
+ Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
+ soap_server_fault_ex(function, EG(exception), NULL TSRMLS_CC);
+ } else {
+ zend_exception_error(EG(exception) TSRMLS_CC);
+ }
+ }
+#endif
+ zval_dtor(&constructor);
+ zval_dtor(&c_ret);
+ }
+ efree(class_name);
}
- efree(class_name);
#if HAVE_PHP_SESSION
/* If session then update session hash with new object */
if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
}
soap_server_fault_ex(function, &h->retval, h TSRMLS_CC);
#ifdef ZEND_ENGINE_2
- } else if (EG(exception) &&
- Z_TYPE_P(EG(exception)) == IS_OBJECT &&
- Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
- zval *headerfault = NULL, **tmp;
-
- if (zend_hash_find(Z_OBJPROP_P(EG(exception)), "headerfault", sizeof("headerfault"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) != IS_NULL) {
- headerfault = *tmp;
- }
- soap_server_fault_ex(function, EG(exception), h TSRMLS_CC);
+ } else if (EG(exception)) {
+ if (Z_TYPE_P(EG(exception)) == IS_OBJECT &&
+ Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
+ zval *headerfault = NULL, **tmp;
+
+ if (zend_hash_find(Z_OBJPROP_P(EG(exception)), "headerfault", sizeof("headerfault"), (void**)&tmp) == SUCCESS &&
+ Z_TYPE_PP(tmp) != IS_NULL) {
+ headerfault = *tmp;
+ }
+ soap_server_fault_ex(function, EG(exception), h TSRMLS_CC);
+ } else {
+ zend_exception_error(EG(exception) TSRMLS_CC);
+ }
#endif
}
} else if (h->mustUnderstand) {
if (zend_hash_exists(function_table, php_strtolower(fn_name, Z_STRLEN(function_name)), Z_STRLEN(function_name) + 1)) {
if (service->type == SOAP_CLASS) {
call_status = call_user_function(NULL, &soap_obj, &function_name, &retval, num_params, params TSRMLS_CC);
+#if HAVE_PHP_SESSION
if (service->soap_class.persistance != SOAP_PERSISTENCE_SESSION) {
zval_ptr_dtor(&soap_obj);
}
+#endif
} else {
call_status = call_user_function(EG(function_table), NULL, &function_name, &retval, num_params, params TSRMLS_CC);
}
efree(fn_name);
#ifdef ZEND_ENGINE_2
- if (EG(exception) &&
- Z_TYPE_P(EG(exception)) == IS_OBJECT &&
- Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
- soap_server_fault_ex(function, EG(exception), NULL TSRMLS_CC);
+ if (EG(exception)) {
+ if (Z_TYPE_P(EG(exception)) == IS_OBJECT &&
+ Z_OBJCE_P(EG(exception)) == soap_fault_class_entry) {
+ soap_server_fault_ex(function, EG(exception), NULL TSRMLS_CC);
+ } else {
+ zend_exception_error(EG(exception) TSRMLS_CC);
+ }
}
#endif
if (call_status == SUCCESS) {
} else if (function && function->faults &&
zend_hash_num_elements(function->faults) == 1) {
- fault = *(sdlFaultPtr*)function->faults->pListHead->pData;
+ zend_hash_internal_pointer_reset(function->faults);
+ zend_hash_get_current_data(function->faults, (void**)&fault);
+ fault = *(sdlFaultPtr*)fault;
if (function->binding &&
function->binding->bindingType == BINDING_SOAP &&
fault->bindingAttributes) {
node = xmlNewNode(NULL, detail_name);
xmlAddChild(param, node);
- sparam = *(sdlParamPtr*)fault->details->pListHead->pData;
+ zend_hash_internal_pointer_reset(fault->details);
+ zend_hash_get_current_data(fault->details, (void**)&sparam);
+ sparam = *(sdlParamPtr*)sparam;
x = serialize_parameter(sparam, detail, 1, NULL, use, node TSRMLS_CC);
if (function &&
if (function->responseParameters &&
zend_hash_num_elements(function->responseParameters) > 0) {
if (zend_hash_num_elements(function->responseParameters) == 1) {
- param = function->responseParameters->pListHead->pData;
+ zend_hash_internal_pointer_reset(function->responseParameters);
+ zend_hash_get_current_data(function->responseParameters, (void**)¶m);
if ((*param)->encode && (*param)->encode->details.type_str) {
smart_str_appendl(buf, (*param)->encode->details.type_str, strlen((*param)->encode->details.type_str));
smart_str_appendc(buf, ' ');
smart_str_appendc(buf, ' ');
} else if (type->elements &&
zend_hash_num_elements(type->elements) == 1 &&
- (elementType = *(sdlTypePtr*)type->elements->pListHead->pData) != NULL &&
+ (zend_hash_internal_pointer_reset(type->elements),
+ zend_hash_get_current_data(type->elements, (void**)&elementType) == SUCCESS) &&
+ (elementType = *(sdlTypePtr*)elementType) != NULL &&
elementType->encode && elementType->encode->details.type_str) {
smart_str_appends(buf, elementType->encode->details.type_str);
smart_str_appendc(buf, ' ');