8000 Avoid creating a zend_string twice in soap do_request · php/php-src@b05d50e · GitHub
[go: up one dir, main page]

Skip to content

Commit b05d50e

Browse files
committed
Avoid creating a zend_string twice in soap do_request
1 parent 99bc0a5 commit b05d50e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/soap/soap.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,12 +2221,6 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co
22212221
}
22222222

22232223
zend_try {
2224-
zval *trace = Z_CLIENT_TRACE_P(this_ptr);
2225-
if (Z_TYPE_P(trace) == IS_TRUE) {
2226-
zval_ptr_dtor(Z_CLIENT_LAST_REQUEST_P(this_ptr));
2227-
ZVAL_STRINGL(Z_CLIENT_LAST_REQUEST_P(this_ptr), buf, buf_size);
2228-
}
2229-
22302224
ZVAL_STRINGL(&params[0], buf, buf_size);
22312225
ZVAL_STRING(&params[1], location);
22322226
if (action == NULL) {
@@ -2237,6 +2231,12 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co
22372231
ZVAL_LONG(&params[3], version);
22382232
ZVAL_BOOL(&params[4], one_way);
22392233

2234+
zval *trace = Z_CLIENT_TRACE_P(this_ptr);
2235+
if (Z_TYPE_P(trace) == IS_TRUE) {
2236+
zval_ptr_dtor(Z_CLIENT_LAST_REQUEST_P(this_ptr));
2237+
ZVAL_COPY(Z_CLIENT_LAST_REQUEST_P(this_ptr), &params[0]);
2238+
}
2239+
22402240
zend_function *func = zend_hash_str_find_ptr(&Z_OBJCE_P(this_ptr)->function_table, ZEND_STRL("__dorequest"));
22412241
ZEND_ASSERT(func != NULL);
22422242

0 commit comments

Comments
 (0)
0