iliaa                                    Wed, 09 Jun 2010 15:48:22 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=300317

Log:
Fixed bug #51273 (Faultstring property does not exist when the faultstring is 
empty)

# Patch by dennis at transip dot nl

Bug: http://bugs.php.net/51273 (Open) Faultstring property does not exist when 
the faultstring is empty
      
Changed paths:
    U   php/php-src/branches/PHP_5_2/NEWS
    U   php/php-src/branches/PHP_5_2/ext/soap/soap.c
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/soap/soap.c
    U   php/php-src/trunk/ext/soap/soap.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS   2010-06-09 15:39:03 UTC (rev 300316)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-06-09 15:48:22 UTC (rev 300317)
@@ -48,6 +48,8 @@
 - Fixed bug #51374 (Wrongly initialized object properties). (Etienne)
 - Fixed bug #51338 (URL-Rewriter is still enabled if use_only_cookies is
   on). (Ilia, j dot jeising at gmail dot com)
+- 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 #51263 (imagettftext and rotated text uses wrong baseline)
   (cschneid at cschneid dot com, Takeshi Abe)

Modified: php/php-src/branches/PHP_5_2/ext/soap/soap.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/soap/soap.c        2010-06-09 15:39:03 UTC 
(rev 300316)
+++ php/php-src/branches/PHP_5_2/ext/soap/soap.c        2010-06-09 15:48:22 UTC 
(rev 300317)
@@ -3240,12 +3240,12 @@
        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);


Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-06-09 15:39:03 UTC (rev 300316)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-06-09 15:48:22 UTC (rev 300317)
@@ -134,6 +134,8 @@
   (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)

Modified: php/php-src/branches/PHP_5_3/ext/soap/soap.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/soap/soap.c        2010-06-09 15:39:03 UTC 
(rev 300316)
+++ php/php-src/branches/PHP_5_3/ext/soap/soap.c        2010-06-09 15:48:22 UTC 
(rev 300317)
@@ -3422,12 +3422,12 @@
        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);


Modified: php/php-src/trunk/ext/soap/soap.c
===================================================================
--- php/php-src/trunk/ext/soap/soap.c   2010-06-09 15:39:03 UTC (rev 300316)
+++ php/php-src/trunk/ext/soap/soap.c   2010-06-09 15:48:22 UTC (rev 300317)
@@ -3372,12 +3372,12 @@
        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);


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to