php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55323
Patch php_encoding.c revision 2011-08-01 23:49 UTC by webm4st0r at gmail dot com
revision 2011-07-30 08:44 UTC by webm4st0r at gmail dot com

Patch php_encoding.c for SOAP related Bug #55323

Patch version 2011-08-01 23:49 UTC

Return to Bug #55323 | Download this patch
Patch Revisions:

Developer: webm4st0r@gmail.com

diff --git a/php_encoding.c b/php_encoding.c
index 16981fa..6e9a403 100644
--- a/php_encoding.c
+++ b/php_encoding.c
@@ -1513,6 +1513,13 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e
                            sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST &&
                            sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) {

+                ALLOC_INIT_ZVAL(ret);
+                FIND_XML_NULL(data, ret);
+                if (soap_check_xml_ref(&ret, data TSRMLS_CC)) {
+                    return ret;
+                }
+                zval_ptr_dtor(&ret);
+
                            if (ce != ZEND_STANDARD_CLASS_DEF_PTR &&
                                sdlType->encode->to_zval == sdl_guess_convert_zval &&
                                sdlType->encode->details.sdl_type != NULL &&
@@ -1526,10 +1533,6 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e
                            } else {
                                        ret = master_to_zval_int(sdlType->encode, data);
                                }
-                               FIND_XML_NULL(data, ret);
-                               if (soap_check_xml_ref(&ret, data TSRMLS_CC)) {
-                                       return ret;
-                               }
                                redo_any = get_zval_property(ret, "any" TSRMLS_CC);
                                if (Z_TYPE_P(ret) == IS_OBJECT && ce != ZEND_STANDARD_CLASS_DEF_PTR) {
                                        zend_object *zobj = zend_objects_get_address(ret TSRMLS_CC);
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 22:02:05 2014 UTC