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);
|
||||
} else {
|
||||
if (Z_TYPE(val) != IS_STRING) {
|
||||
zval newvalue;
|
||||
ZVAL_DUP(&newvalue, &val);
|
||||
convert_to_string(&newvalue);
|
||||
xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(newvalue), Z_STRLEN(newvalue));
|
||||
zval_dtor(&newvalue);
|
||||
zend_string *str = zval_get_string_func(&val);
|
||||
xReturn = XMLRPC_CreateValueBase64(key, ZSTR_VAL(str), ZSTR_LEN(str));
|
||||
zend_string_release(str);
|
||||
} else {
|
||||
xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(val), Z_STRLEN(val));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue