]> granicus.if.org Git - php/commitdiff
Fixed bug #51273 (Faultstring property does not exist when the faultstring is empty)
authorIlia Alshanetsky <iliaa@php.net>
Wed, 9 Jun 2010 15:48:22 +0000 (15:48 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 9 Jun 2010 15:48:22 +0000 (15:48 +0000)
# Patch by dennis at transip dot nl

NEWS
ext/soap/soap.c

diff --git a/NEWS b/NEWS
index 2a4a66c8e3091caadc9e24f9d24898c9c1708c69..6d94560dcb205de06ce9b7b8ef76a7ff3bb2709d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -134,6 +134,8 @@ PHP                                                                        NEWS
   (Oracle Corp.)
 - Fixed bug #51276 (php_load_extension() is missing when HAVE_LIBDL is undefined). 
   (Tony)
+- Fixed bug #51273 (Faultstring property does not exist when the faultstring is
+  empty) (Ilia, dennis at transip dot nl)
 - Fixed bug #51269 (zlib.output_compression Overwrites Vary Header). (Adam)
 - Fixed bug #51257 (CURL_VERSION_LARGEFILE incorrectly used after libcurl
   version 7.10.1). (aron dot ujvari at microsec dot hu)
index 2edda30ec78fa674c4aa7582fc0745998bc50fa5..ba03f9736f1cea060c55b4201ddc659b51d7e12b 100644 (file)
@@ -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);