rrichards               Tue Jul  3 14:55:53 2007 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/simplexml/tests        bug41861.phpt 

  Modified files:              
    /php-src/ext/simplexml      simplexml.c 
  Log:
  fix bug #41861 (getNamespaces() returns namespaces of node's siblings)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.30&r2=1.151.2.22.2.31&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.30 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.31
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.30   Mon Jul  2 11:35:18 2007
+++ php-src/ext/simplexml/simplexml.c   Tue Jul  3 14:55:53 2007
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.30 2007/07/02 11:35:18 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.31 2007/07/03 14:55:53 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1396,15 +1396,12 @@
        GET_NODE(sxe, node);
        node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
 
-       while (node) {
-               SKIP_TEXT(node)
+       if (node) {
                if (node->type == XML_ELEMENT_NODE) {
                        sxe_add_namespaces(sxe, node, recursive, return_value 
TSRMLS_CC);
                } else if (node->type == XML_ATTRIBUTE_NODE && node->ns) {
                        sxe_add_namespace_name(return_value, node->ns);
                }
-next_iter:
-               node = node->next;
        }
 }
 /* }}} */
@@ -2423,7 +2420,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.30 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.31 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");

http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug41861.phpt?view=markup&rev=1.1
Index: php-src/ext/simplexml/tests/bug41861.phpt
+++ php-src/ext/simplexml/tests/bug41861.phpt

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

Reply via email to