helly           Sat Oct 25 19:06:25 2003 EDT

  Modified files:              
    /php-src/ext/simplexml      simplexml.c 
    /php-src/ext/simplexml/tests        004.phpt 
  Log:
  Fix test 4 with the help of Rob
  
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.68 php-src/ext/simplexml/simplexml.c:1.69
--- php-src/ext/simplexml/simplexml.c:1.68      Sat Oct 25 17:28:01 2003
+++ php-src/ext/simplexml/simplexml.c   Sat Oct 25 19:06:19 2003
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.68 2003/10/25 21:28:01 helly Exp $ */
+/* $Id: simplexml.c,v 1.69 2003/10/25 23:06:19 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -410,7 +410,12 @@
                _get_base_node_value(sxe, node, &value TSRMLS_CC);
                
                name = (char *) node->name;
-               namelen = xmlStrlen(node->name) + 1;
+               if (!name) {
+                       name = "CDATA";
+                       namelen = sizeof("CDATA");
+               } else {
+                       namelen = xmlStrlen(node->name) + 1;
+               }
 
                h = zend_hash_func(name, namelen);
                if (zend_hash_quick_find(rv, name, namelen, h, (void **) &data_ptr) == 
SUCCESS) {
@@ -1086,7 +1091,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.68 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.69 $");
        php_info_print_table_row(2, "Schema support", 
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");
Index: php-src/ext/simplexml/tests/004.phpt
diff -u php-src/ext/simplexml/tests/004.phpt:1.1 
php-src/ext/simplexml/tests/004.phpt:1.2
--- php-src/ext/simplexml/tests/004.phpt:1.1    Sat Oct 25 17:07:37 2003
+++ php-src/ext/simplexml/tests/004.phpt        Sat Oct 25 19:06:23 2003
@@ -23,13 +23,12 @@
 
             [elem2] => simplexml_element Object
                 (
-                    [elem3] => simplexml_element Object
+                    [CDATA] => simplexml_element Object
                         (
-                            [included-entity] => simplexml_element Object
-                                (
-                                    [included-entity] => This is text included from 
an entity
-                                )
+                        )
 
+                    [elem3] => simplexml_element Object
+                        (
                             [elem4] => simplexml_element Object
                                 (
                                     [test] => simplexml_element Object

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

Reply via email to