FAQ
Commit: 794a28832dcfe59fc1ad82a8dda8e3b569ed5637
Author: Xinchen Hui <laruence@php.net> Fri, 27 Feb 2015 23:35:37 +0800
Parents: 8f5676f73e57345b61447a27bc493b1b8f95ab5b 4119879a3905cb1b089f475e8a0471717f7049b3
Branches: master

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=794a28832dcfe59fc1ad82a8dda8e3b569ed5637

Log:
Merge branch 'PHP-5.6'

Conflicts:
  ext/soap/soap.c

Changed paths:
   MM ext/soap/soap.c


Diff:
diff --cc ext/soap/soap.c
index 63de000,6f56216..3a27f7a
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@@ -2580,39 -2562,45 +2580,39 @@@ static int do_request(zval *this_ptr, x
     return FALSE;
    }

  - if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
  - Z_TYPE_PP(trace) == IS_LONG && Z_LVAL_PP(trace) > 0) {
  - add_property_stringl(this_ptr, "__last_request", buf, buf_size, 1);
  + if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
- Z_LVAL_P(trace) > 0) {
++ Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
  + add_property_stringl(this_ptr, "__last_request", buf, buf_size);
    }

  - INIT_ZVAL(func);
  - ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1,0);
  - ALLOC_INIT_ZVAL(params[0]);
  - ZVAL_STRINGL(params[0], buf, buf_size, 1);
  - ALLOC_INIT_ZVAL(params[1]);
  + ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1);
  + ZVAL_STRINGL(&params[0], buf, buf_size);
    if (location == NULL) {
  - ZVAL_NULL(params[1]);
  + ZVAL_NULL(&params[1]);
    } else {
  - ZVAL_STRING(params[1], location, 1);
  + ZVAL_STRING(&params[1], location);
    }
  - ALLOC_INIT_ZVAL(params[2]);
    if (action == NULL) {
  - ZVAL_NULL(params[2]);
  + ZVAL_NULL(&params[2]);
    } else {
  - ZVAL_STRING(params[2], action, 1);
  + ZVAL_STRING(&params[2], action);
    }
  - ALLOC_INIT_ZVAL(params[3]);
  - ZVAL_LONG(params[3], version);
  + ZVAL_LONG(&params[3], version);
  + ZVAL_LONG(&params[4], one_way);

  - ALLOC_INIT_ZVAL(params[4]);
  - ZVAL_LONG(params[4], one_way);
  -
  - if (call_user_function(NULL, &this_ptr, &func, response, 5, params TSRMLS_CC) != SUCCESS) {
  - add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL TSRMLS_CC);
  + if (call_user_function(NULL, this_ptr, &func, response, 5, params) != SUCCESS) {
  + add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL);
     ret = FALSE;
    } else if (Z_TYPE_P(response) != IS_STRING) {
  - if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault"), (void **) &fault) == FAILURE) {
  - add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL TSRMLS_CC);
  + if ((fault = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault")-1)) == NULL) {
  + add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL);
     }
     ret = FALSE;
  - } else if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
  - Z_TYPE_PP(trace) == IS_LONG && Z_LVAL_PP(trace) > 0) {
  - add_property_stringl(this_ptr, "__last_response", Z_STRVAL_P(response), Z_STRLEN_P(response), 1);
  + } else if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
- Z_LVAL_P(trace) > 0) {
++ Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
  + add_property_str(this_ptr, "__last_response", zend_string_copy(Z_STR_P(response)));
    }
  + zval_ptr_dtor(&func);
    zval_ptr_dtor(&params[4]);
    zval_ptr_dtor(&params[3]);
    zval_ptr_dtor(&params[2]);
@@@ -2908,20 -2903,24 +2908,20 @@@ PHP_METHOD(SoapClient, __call
    }

    /* Add default headers */
  - if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers"), (void **) &tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_ARRAY) {
  - HashTable *default_headers = Z_ARRVAL_P(*tmp);
  + this_ptr = getThis();
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) != NULL) {
++ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) != NULL && Z_TYPE_P(tmp) == IS_ARRAY) {
  + HashTable *default_headers = Z_ARRVAL_P(tmp);
     if (soap_headers) {
      if (!free_soap_headers) {
  - HashTable *t = emalloc(sizeof(HashTable));
  - zend_hash_init(t, 0, NULL, ZVAL_PTR_DTOR, 0);
  - zend_hash_copy(t, soap_headers, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
  - soap_headers = t;
  + soap_headers = zend_array_dup(soap_headers);
       free_soap_headers = 1;
      }
  - zend_hash_internal_pointer_reset(default_headers);
  - while (zend_hash_get_current_data(default_headers, (void**)&tmp) == SUCCESS) {
  - Z_ADDREF_PP(tmp);
  - zend_hash_next_index_insert(soap_headers, tmp, sizeof(zval *), NULL);
  - zend_hash_move_forward(default_headers);
  - }
  + ZEND_HASH_FOREACH_VAL(default_headers, tmp) {
  + Z_ADDREF_P(tmp);
  + zend_hash_next_index_insert(soap_headers, tmp);
  + } ZEND_HASH_FOREACH_END();
     } else {
  - soap_headers = Z_ARRVAL_P(*tmp);
  + soap_headers = Z_ARRVAL_P(tmp);
      free_soap_headers = 0;
     }
    }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedFeb 27, '15 at 3:36p
activeFeb 27, '15 at 3:36p
posts1
users1
websitephp.net

1 user in discussion

Xinchen Hui: 1 post

People

Translate

site design / logo © 2018 Grokbase