diff options
author | Marcus Boerger <helly@php.net> | 2003-10-25 23:06:23 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-10-25 23:06:23 +0000 |
commit | 07d94c241022ba442e27f43b2cda3b895717632a (patch) | |
tree | 46198b68b7256353d2810f483d7649d11e5ea52d /ext | |
parent | 26bfe3f83a22b371fb2bf741600ab49d7ea39c04 (diff) | |
download | php-git-07d94c241022ba442e27f43b2cda3b895717632a.tar.gz |
Fix test 4 with the help of Rob
Diffstat (limited to 'ext')
-rw-r--r-- | ext/simplexml/simplexml.c | 7 | ||||
-rwxr-xr-x | ext/simplexml/tests/004.phpt | 9 |
2 files changed, 10 insertions, 6 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 16e64a344a..f7a86a3d28 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -410,7 +410,12 @@ sxe_properties_get(zval *object TSRMLS_DC) _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) { diff --git a/ext/simplexml/tests/004.phpt b/ext/simplexml/tests/004.phpt index a4323711db..7428a98ba7 100755 --- a/ext/simplexml/tests/004.phpt +++ b/ext/simplexml/tests/004.phpt @@ -23,13 +23,12 @@ simplexml_element Object [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 |