mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
- fixed bug if attribute value is entity
This commit is contained in:
parent
9eef999b38
commit
d526de3fa8
@ -530,7 +530,8 @@ PHP_FUNCTION(domxml_attributes)
|
||||
}
|
||||
|
||||
while(attr) {
|
||||
add_assoc_string(return_value, (char *) attr->name, attr->val->content, 1);
|
||||
if(attr->val->content)
|
||||
add_assoc_string(return_value, (char *) attr->name, attr->val->content, 1);
|
||||
attr = attr->next;
|
||||
}
|
||||
}
|
||||
@ -907,7 +908,8 @@ static int node_attributes(zval **attributes, xmlNode *nodep)
|
||||
object_init_ex(pattr, domxmlattr_class_entry_ptr);
|
||||
add_property_resource(pattr, "attribute", ret);
|
||||
add_property_stringl(pattr, "name", (char *) attr->name, strlen(attr->name), 1);
|
||||
add_property_stringl(pattr, "value", (char *) attr->val->content, strlen(attr->val->content), 1);
|
||||
if(attr->val->content)
|
||||
add_property_stringl(pattr, "value", (char *) attr->val->content, strlen(attr->val->content), 1);
|
||||
zend_hash_next_index_insert((*attributes)->value.ht, &pattr, sizeof(zval *), NULL);
|
||||
attr = attr->next;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ $xmlstr = "<?xml version='1.0'?>
|
||||
<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'>
|
||||
<chapter language='en'><title language='en'>Title</title>
|
||||
<para language='ge'>
|
||||
<informaltable language='sp'>
|
||||
<informaltable language='&sp;'>
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry>a1</entry><entry morerows='1'>b1</entry><entry>c1</entry></row>
|
||||
|
Loading…
Reference in New Issue
Block a user