cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c /ext/simplexml/tests bug41867.phpt

From: Date: Mon, 02 Jul 2007 11:35:18 +0000
Subject: cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c /ext/simplexml/tests bug41867.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-45067@lists.php.net to get a copy of this message
rrichards Mon Jul 2 11:35:18 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/simplexml/tests bug41867.phpt Modified files: /php-src/ext/simplexml simplexml.c Log: fix bug #41867 (getName is broken) add test http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.29&r2=1.151.2.22.2.30&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.29 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.30 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.29 Sun Jun 24 11:41:12 2007 +++ php-src/ext/simplexml/simplexml.c Mon Jul 2 11:35:18 2007 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.29 2007/06/24 11:41:12 nlopess Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.30 2007/07/02 11:35:18 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1488,9 +1488,13 @@ sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); GET_NODE(sxe, node); - - namelen = xmlStrlen(node->name); - RETURN_STRINGL((char*)node->name, namelen, 1); + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + if (node) { + namelen = xmlStrlen(node->name); + RETURN_STRINGL((char*)node->name, namelen, 1); + } else { + RETURN_EMPTY_STRING(); + } } /* }}} */ @@ -2419,7 +2423,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.29 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.30 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug41867.phpt?view=markup&rev=1.1 Index: php-src/ext/simplexml/tests/bug41867.phpt +++ php-src/ext/simplexml/tests/bug41867.phpt

« previous php.cvs (#45067) next »