From: Xinchen Hui Date: Tue, 11 Nov 2014 08:31:32 +0000 (+0800) Subject: Merge branch 'PHP-5.6' X-Git-Tag: PRE_NATIVE_TLS_MERGE~130^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75b6f9733416d393fd6f4a21cb1610731c04f3aa;p=php Merge branch 'PHP-5.6' Conflicts: ext/soap/soap.c --- 75b6f9733416d393fd6f4a21cb1610731c04f3aa diff --cc ext/soap/soap.c index 2b37622a7a,31ea775989..94b5cf22a2 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@@ -4705,19 -4738,21 +4705,20 @@@ static void type_to_string(sdlTypePtr t if (type->encode && (type->encode->details.type == IS_ARRAY || type->encode->details.type == SOAP_ENC_ARRAY)) { - sdlAttributePtr *attr; - sdlExtraAttributePtr *ext; + sdlAttributePtr attr; + sdlExtraAttributePtr ext; if (type->attributes && - zend_hash_find(type->attributes, SOAP_1_1_ENC_NAMESPACE":arrayType", - sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType"), - (void **)&attr) == SUCCESS && - (*attr)->extraAttributes && - zend_hash_find((*attr)->extraAttributes, WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) == SUCCESS) { - char *end = strchr((*ext)->val, '['); + (attr = zend_hash_str_find_ptr(type->attributes, SOAP_1_1_ENC_NAMESPACE":arrayType", + sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType")-1)) != NULL && ++ attr->extraAttributes && + (ext = zend_hash_str_find_ptr(attr->extraAttributes, WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType")-1)) != NULL) { + char *end = strchr(ext->val, '['); int len; if (end == NULL) { - len = strlen((*ext)->val); + len = strlen(ext->val); } else { - len = end-(*ext)->val; + len = end-ext->val; } if (len == 0) { smart_str_appendl(buf, "anyType", sizeof("anyType")-1); @@@ -4732,10 -4767,12 +4733,11 @@@ } else { sdlTypePtr elementType; if (type->attributes && - zend_hash_find(type->attributes, SOAP_1_2_ENC_NAMESPACE":itemType", - sizeof(SOAP_1_2_ENC_NAMESPACE":itemType"), - (void **)&attr) == SUCCESS && - (*attr)->extraAttributes && - zend_hash_find((*attr)->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) == SUCCESS) { - smart_str_appends(buf, (*ext)->val); + (attr = zend_hash_str_find_ptr(type->attributes, SOAP_1_2_ENC_NAMESPACE":itemType", + sizeof(SOAP_1_2_ENC_NAMESPACE":itemType")-1)) != NULL && ++ attr->extraAttributes && + (ext = zend_hash_str_find_ptr(attr->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arrayType")-1)) != NULL) { + smart_str_appends(buf, ext->val); smart_str_appendc(buf, ' '); } else if (type->elements && zend_hash_num_elements(type->elements) == 1 && @@@ -4749,11 -4787,13 +4751,12 @@@ } smart_str_appendl(buf, type->name, strlen(type->name)); if (type->attributes && - zend_hash_find(type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize", - sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"), - (void **)&attr) == SUCCESS && - (*attr)->extraAttributes && - zend_hash_find((*attr)->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arraySize"), (void **)&ext) == SUCCESS) { + (attr = zend_hash_str_find_ptr(type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize", + sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize")-1)) != NULL && ++ attr->extraAttributes && + (ext = zend_hash_str_find_ptr(attr->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":arraySize")-1)) != NULL) { smart_str_appendc(buf, '['); - smart_str_appends(buf, (*ext)->val); + smart_str_appends(buf, ext->val); smart_str_appendc(buf, ']'); } else { smart_str_appendl(buf, "[]", 2);