mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
Fixed SoapFault::getMessage()
This commit is contained in:
parent
51977c926c
commit
0623f8471a
@ -808,8 +808,8 @@ PHP_METHOD(SoapFault, SoapFault)
|
||||
|
||||
|
||||
#ifdef ZEND_ENGINE_2
|
||||
/* {{{ proto object SoapFault::SoapFault ( string faultcode, string faultstring [, string faultactor [, mixed detail [, string faultname [, mixed headerfault]]]])
|
||||
SoapFault constructor */
|
||||
/* {{{ proto object SoapFault::__toString ()
|
||||
*/
|
||||
PHP_METHOD(SoapFault, __toString)
|
||||
{
|
||||
zval *faultcode, *faultstring, *file, *line, *trace;
|
||||
@ -818,6 +818,10 @@ PHP_METHOD(SoapFault, __toString)
|
||||
zend_fcall_info fci;
|
||||
zval fname;
|
||||
|
||||
if (ZEND_NUM_ARGS() > 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
faultcode = zend_read_property(soap_fault_class_entry, this_ptr, "faultcode", sizeof("faultcode")-1, 1 TSRMLS_CC);
|
||||
faultstring = zend_read_property(soap_fault_class_entry, this_ptr, "faultstring", sizeof("faultstring")-1, 1 TSRMLS_CC);
|
||||
file = zend_read_property(soap_fault_class_entry, this_ptr, "file", sizeof("file")-1, 1 TSRMLS_CC);
|
||||
@ -2979,6 +2983,9 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha
|
||||
}
|
||||
if (fault_string != NULL) {
|
||||
add_property_string(obj, "faultstring", fault_string, 1);
|
||||
#ifdef ZEND_ENGINE_2
|
||||
zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC);
|
||||
#endif
|
||||
}
|
||||
if (fault_code != NULL) {
|
||||
int soap_version = SOAP_GLOBAL(soap_version);
|
||||
|
Loading…
Reference in New Issue
Block a user