php.net |  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: -
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: galaevnik at yandex dot ru
New email:
PHP Version: OS:

 

 [2015-09-08 12:22 UTC] galaevnik at yandex dot ru
Description:
------------
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:
https://github.com/php/php-src/blob/master/ext/soap/soap.c:2602

Test script:
---------------
https://github.com/php/php-src/blob/master/ext/soap/soap.c:2602
} 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);
				zend_string_release(msg);
			} 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC