mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
More effecient conversion
This commit is contained in:
parent
515b0508e0
commit
ae620a06cd
1 changed files with 3 additions and 5 deletions
|
@ -516,11 +516,9 @@ static XMLRPC_VALUE PHP_to_XMLRPC_worker (const char* key, zval* in_val, int dep
|
||||||
XMLRPC_SetValueID(xReturn, key, 0);
|
XMLRPC_SetValueID(xReturn, key, 0);
|
||||||
} else {
|
} else {
|
||||||
if (Z_TYPE(val) != IS_STRING) {
|
if (Z_TYPE(val) != IS_STRING) {
|
||||||
zval newvalue;
|
zend_string *str = zval_get_string_func(&val);
|
||||||
ZVAL_DUP(&newvalue, &val);
|
xReturn = XMLRPC_CreateValueBase64(key, ZSTR_VAL(str), ZSTR_LEN(str));
|
||||||
convert_to_string(&newvalue);
|
zend_string_release(str);
|
||||||
xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(newvalue), Z_STRLEN(newvalue));
|
|
||||||
zval_dtor(&newvalue);
|
|
||||||
} else {
|
} else {
|
||||||
xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(val), Z_STRLEN(val));
|
xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(val), Z_STRLEN(val));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue