|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70462 SOAP call with one_way=1 always returns "SoapClient::__doRequest() returned no"
Submitted: 2015-09-08 12:22 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: galaevnik at yandex dot ru Assigned:
Status: Open Package: SOAP related
PHP Version: 5.6.13 OS: Win7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-09-08 12:22 UTC] galaevnik at yandex dot ru
PHP 5.3 && 5.6.7 && actual 5.6+
If we call SoapClient::__doRequest() with $one_way = 1 we always have same error:
SoapClient::__doRequest() returned non string value
But when we calling one-way request we didn't expect to get response at all, and yes, this is non-string value. Code below shows, than there is no checks on this var in __doRequest at all:

Test script:
} else if (Z_TYPE_P(response) != IS_STRING) {
			if (EG(exception) && instanceof_function(EG(exception)->ce, zend_ce_error)) {
				zval rv;
				zend_string *msg;
				zval exception_object;

				ZVAL_OBJ(&exception_object, EG(exception));
				msg = zval_get_string(zend_read_property(zend_ce_error, &exception_object, "message", sizeof("message")-1, 0, &rv));
				/* change class */
				EG(exception)->ce = soap_fault_class_entry;
				set_soap_fault(&exception_object, NULL, "Client", ZSTR_VAL(msg), NULL, NULL, NULL);
			} else 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;

Expected result:
If we call one-way SOAP query we didn't expect on response at all, so i expected to see null or false, but not critical error.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 06 21:01:04 2020 UTC