mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Avoid creating a zend_string twice in soap do_request
This commit is contained in:
@@ -2221,12 +2221,6 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co
|
||||
}
|
||||
|
||||
zend_try {
|
||||
zval *trace = Z_CLIENT_TRACE_P(this_ptr);
|
||||
if (Z_TYPE_P(trace) == IS_TRUE) {
|
||||
zval_ptr_dtor(Z_CLIENT_LAST_REQUEST_P(this_ptr));
|
||||
ZVAL_STRINGL(Z_CLIENT_LAST_REQUEST_P(this_ptr), buf, buf_size);
|
||||
}
|
||||
|
||||
ZVAL_STRINGL(¶ms[0], buf, buf_size);
|
||||
ZVAL_STRING(¶ms[1], location);
|
||||
if (action == NULL) {
|
||||
@@ -2237,6 +2231,12 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co
|
||||
ZVAL_LONG(¶ms[3], version);
|
||||
ZVAL_BOOL(¶ms[4], one_way);
|
||||
|
||||
zval *trace = Z_CLIENT_TRACE_P(this_ptr);
|
||||
if (Z_TYPE_P(trace) == IS_TRUE) {
|
||||
zval_ptr_dtor(Z_CLIENT_LAST_REQUEST_P(this_ptr));
|
||||
ZVAL_COPY(Z_CLIENT_LAST_REQUEST_P(this_ptr), ¶ms[0]);
|
||||
}
|
||||
|
||||
zend_function *func = zend_hash_str_find_ptr(&Z_OBJCE_P(this_ptr)->function_table, ZEND_STRL("__dorequest"));
|
||||
ZEND_ASSERT(func != NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user