Skip to content

Commit 400769f

Browse files
author
Ilia Alshanetsky
committed
Fixed bug #51273 (Faultstring property does not exist when the faultstring is empty)
# Patch by dennis at transip dot nl
1 parent 9d65730 commit 400769f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/soap/soap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,12 +3372,12 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha
33723372
if (Z_TYPE_P(obj) != IS_OBJECT) {
33733373
object_init_ex(obj, soap_fault_class_entry);
33743374
}
3375-
if (fault_string != NULL) {
3376-
add_property_string(obj, "faultstring", fault_string, 1);
3375+
3376+
add_property_string(obj, "faultstring", fault_string ? fault_string : "", 1);
33773377
#ifdef ZEND_ENGINE_2
3378-
zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC);
3378+
zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, (fault_string ? fault_string : "") TSRMLS_CC);
33793379
#endif
3380-
}
3380+
33813381
if (fault_code != NULL) {
33823382
int soap_version = SOAP_GLOBAL(soap_version);
33833383

0 commit comments

Comments
 (0)