]> granicus.if.org Git - php/commitdiff
- Fix tests
authorMarcus Boerger <helly@php.net>
Wed, 30 Nov 2005 08:14:49 +0000 (08:14 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 30 Nov 2005 08:14:49 +0000 (08:14 +0000)
ext/simplexml/simplexml.c
ext/simplexml/tests/023.phpt

index 33f12c04509a97e3ad5059bd76f267b87dcbf483..f1c4a73b09fa60b80d58e80d3fa6ff3769ee2ac4 100644 (file)
@@ -865,7 +865,7 @@ static HashTable * sxe_properties_get(zval *object TSRMLS_DC)
        if (node && sxe->iter.type != SXE_ITER_ATTRLIST) {
                if (node->type == XML_ATTRIBUTE_NODE) {
                        MAKE_STD_ZVAL(value);
-                       ZVAL_STRING(value, sxe_xmlNodeListGetString(node->doc, node->children, 1), 0);
+                       ZVAL_U_STRING(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), value, sxe_xmlNodeListGetString(node->doc, node->children, 1), 0);
                        zend_hash_next_index_insert(rv, &value, sizeof(zval *), NULL);
                        node = NULL;
                } else {
@@ -878,7 +878,7 @@ static HashTable * sxe_properties_get(zval *object TSRMLS_DC)
                        } else {
                                if (node->type == XML_TEXT_NODE) {
                                        MAKE_STD_ZVAL(value);
-                                       ZVAL_STRING(value, sxe_xmlNodeListGetString(node->doc, node, 1), 0);
+                                       ZVAL_U_STRING(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), value, sxe_xmlNodeListGetString(node->doc, node, 1), 0);
                                        zend_hash_next_index_insert(rv, &value, sizeof(zval *), NULL);
                                        goto next_iter;
                                }
index c838ea7681e489184ebaa10b7dae51781866b32f..449daf47b7b5007c3843990353512f16ccd31708 100755 (executable)
@@ -39,7 +39,7 @@ object(SimpleXMLElement)#%d (1) {
   [u"@attributes"]=>
   array(1) {
     [u"attr"]=>
-    string(13) "foo bar baz"
+    string(%d) "foo%sbar%sbaz"
   }
 }
 object(SimpleXMLElement)#%d (1) {