Index: ext/soap/php_encoding.c =================================================================== RCS file: /repository/php-src/ext/soap/php_encoding.c,v retrieving revision 1.103.2.20 diff -p -u -r1.103.2.20 php_encoding.c --- ext/soap/php_encoding.c 10 Apr 2006 13:29:48 -0000 1.103.2.20 +++ ext/soap/php_encoding.c 15 Apr 2006 06:14:45 -0000 @@ -211,6 +211,9 @@ encode defaultEncoding[] = { {{END_KNOWN_TYPES, NULL, NULL, NULL}, guess_zval_convert, guess_xml_convert} }; +int numDefaultEncodings = sizeof(defaultEncoding)/sizeof(encode); + + void whiteSpace_replace(char* str) { while (*str != '\0') { Index: ext/soap/php_encoding.h =================================================================== RCS file: /repository/php-src/ext/soap/php_encoding.h,v retrieving revision 1.38.2.2 diff -p -u -r1.38.2.2 php_encoding.h --- ext/soap/php_encoding.h 9 Apr 2006 23:35:51 -0000 1.38.2.2 +++ ext/soap/php_encoding.h 15 Apr 2006 06:14:45 -0000 @@ -222,5 +222,6 @@ void delete_encoder(void *handle); void delete_encoder_persistent(void *handle); extern encode defaultEncoding[]; +extern int numDefaultEncodings; #endif Index: ext/soap/php_sdl.c =================================================================== RCS file: /repository/php-src/ext/soap/php_sdl.c,v retrieving revision 1.88.2.8 diff -p -u -r1.88.2.8 php_sdl.c --- ext/soap/php_sdl.c 10 Apr 2006 10:11:06 -0000 1.88.2.8 +++ ext/soap/php_sdl.c 15 Apr 2006 06:14:45 -0000 @@ -2292,7 +2292,7 @@ static void make_persistent_sdl_type_ref { sdlTypePtr *tmp; - if (zend_hash_find(ptr_map, (char *)(*type), sizeof(sdlTypePtr), (void**)&tmp) == SUCCESS) { + if (zend_hash_find(ptr_map, (char *)type, sizeof(sdlTypePtr), (void**)&tmp) == SUCCESS) { *type = *tmp; } else { zend_hash_next_index_insert(bp_types, (void*)&type, sizeof(sdlTypePtr*), NULL); @@ -2305,11 +2305,11 @@ static void make_persistent_sdl_encoder_ encodePtr *tmp; /* do not process defaultEncoding's here */ - if ((*enc)->details.sdl_type == NULL) { + if ((*enc) >= defaultEncoding && (*enc) < defaultEncoding + numDefaultEncodings) { return; } - if (zend_hash_find(ptr_map, (char *)(*enc), sizeof(encodePtr), (void**)&tmp) == SUCCESS) { + if (zend_hash_find(ptr_map, (char *)enc, sizeof(encodePtr), (void**)&tmp) == SUCCESS) { *enc = *tmp; } else { zend_hash_next_index_insert(bp_encoders, (void*)&enc, sizeof(encodePtr*), NULL); @@ -2513,7 +2513,7 @@ static sdlAttributePtr make_persistent_s } /* we do not want to process defaultEncoding's here */ - if (pattr->encode && pattr->encode->details.sdl_type) { + if (pattr->encode) { make_persistent_sdl_encoder_ref(&pattr->encode, ptr_map, bp_encoders); } @@ -2625,7 +2625,7 @@ static sdlTypePtr make_persistent_sdl_ty } /* we do not want to process defaultEncoding's here */ - if (ptype->encode && ptype->encode->details.sdl_type) { + if (ptype->encode) { make_persistent_sdl_encoder_ref(&ptype->encode, ptr_map, bp_encoders); }