diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2010-06-09 15:48:22 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2010-06-09 15:48:22 +0000 |
commit | 0d4720a61b92ee334d9c6798f4b2cd8960c17bf1 (patch) | |
tree | a7228667958506d4a80f9b27fe76f252eadcf84f /ext/soap | |
parent | 9e5313fdcaf7257abcccc29b504effa07d08211b (diff) | |
download | php-git-0d4720a61b92ee334d9c6798f4b2cd8960c17bf1.tar.gz |
Fixed bug #51273 (Faultstring property does not exist when the faultstring is empty)
# Patch by dennis at transip dot nl
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/soap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 2edda30ec7..ba03f9736f 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -3422,12 +3422,12 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha if (Z_TYPE_P(obj) != IS_OBJECT) { object_init_ex(obj, soap_fault_class_entry); } - if (fault_string != NULL) { - add_property_string(obj, "faultstring", fault_string, 1); + + add_property_string(obj, "faultstring", fault_string ? 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); + zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, (fault_string ? fault_string : "") TSRMLS_CC); #endif - } + if (fault_code != NULL) { int soap_version = SOAP_GLOBAL(soap_version); |