mirror of
https://github.com/php/php-src.git
synced 2024-12-11 19:04:38 +08:00
Fix dumping, when dumping a text element, for example:
<?php $doc = simplexml_load_string('<?xml version="1.0"?> <namelist> <name> <first>helly</first> </name> <name> <first>sterling</first> </name> </namelist>'); var_dump($doc->name[0]->first); Used to not display the node's content, now it does.
This commit is contained in:
parent
510dd7cca5
commit
406c2156d1
@ -592,8 +592,17 @@ sxe_properties_get(zval *object TSRMLS_DC)
|
||||
node = node->children;
|
||||
|
||||
while (node) {
|
||||
SKIP_TEXT(node);
|
||||
|
||||
if (node->children != NULL || node->prev != NULL || node->next != NULL) {
|
||||
SKIP_TEXT(node);
|
||||
} else {
|
||||
if (node->type == XML_TEXT_NODE) {
|
||||
MAKE_STD_ZVAL(value);
|
||||
ZVAL_STRING(value, xmlNodeListGetString(node->doc, node, 1), 1);
|
||||
zend_hash_next_index_insert(rv, &value, sizeof(zval *), NULL);
|
||||
goto next_iter;
|
||||
}
|
||||
}
|
||||
|
||||
name = (char *) node->name;
|
||||
if (!name) {
|
||||
goto next_iter;
|
||||
|
Loading…
Reference in New Issue
Block a user