mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
soap: Fix const violation
This commit is contained in:
@@ -2529,23 +2529,25 @@ static zval *to_zval_array(zval *ret, encodeTypePtr type, xmlNodePtr data)
|
|||||||
if (data &&
|
if (data &&
|
||||||
(attr = get_attribute(data->properties,"arrayType")) &&
|
(attr = get_attribute(data->properties,"arrayType")) &&
|
||||||
attr->children && attr->children->content) {
|
attr->children && attr->children->content) {
|
||||||
char *type, *end, *ns;
|
const char *type;
|
||||||
|
char *end, *ns;
|
||||||
xmlNsPtr nsptr;
|
xmlNsPtr nsptr;
|
||||||
|
|
||||||
parse_namespace(attr->children->content, &type, &ns);
|
parse_namespace(attr->children->content, &type, &ns);
|
||||||
|
char *type_dup = estrdup(type);
|
||||||
nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns));
|
nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns));
|
||||||
|
|
||||||
end = strrchr(type,'[');
|
end = strrchr(type_dup,'[');
|
||||||
if (end) {
|
if (end) {
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
dimension = calc_dimension(end+1);
|
dimension = calc_dimension(end+1);
|
||||||
dims = get_position(dimension, end+1);
|
dims = get_position(dimension, end+1);
|
||||||
}
|
}
|
||||||
if (nsptr != NULL) {
|
if (nsptr != NULL) {
|
||||||
enc = get_encoder(SOAP_GLOBAL(sdl), (char*)nsptr->href, type);
|
enc = get_encoder(SOAP_GLOBAL(sdl), (char*)nsptr->href, type_dup);
|
||||||
}
|
}
|
||||||
if (ns) {efree(ns);}
|
if (ns) {efree(ns);}
|
||||||
|
if (type_dup) efree(type_dup);
|
||||||
} else if ((attr = get_attribute(data->properties,"itemType")) &&
|
} else if ((attr = get_attribute(data->properties,"itemType")) &&
|
||||||
attr->children &&
|
attr->children &&
|
||||||
attr->children->content) {
|
attr->children->content) {
|
||||||
|
|||||||
Reference in New Issue
Block a user