diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-03-24 08:45:54 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-03-24 08:45:54 +0000 |
| commit | 9e26f6c21392ecbf0989f04c71cfa492317a7589 (patch) | |
| tree | 482e8435ddfdd94f765198a3bc754720fcfab0e2 | |
| parent | ed43fd9b3be53a15556cb2f7242372e0be8629a1 (diff) | |
| download | php-git-9e26f6c21392ecbf0989f04c71cfa492317a7589.tar.gz | |
Fixed SoapFault::getMessage()
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | ext/soap/soap.c | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -10,6 +10,7 @@ PHP NEWS (also fixes bug #36764). (Tony) - Removed the E_STRICT deprecation notice from "var". (Ilia) - Fixed debug_zval_dump() to support private and protected members. (Dmitry) +- Fixed SoapFault::getMessage(). (Dmitry) - Fixed bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault). (Tony) - Fixed bug #36820 (Privileged connection with an Oracle password file fails). diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 0ce74898cf..3e73031b47 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -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); @@ -2985,6 +2989,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(), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC); +#endif } if (fault_code != NULL) { int soap_version = SOAP_GLOBAL(soap_version); |
