cvs: /php4/ext/domxml domxml.c /php4/tests testdom
| From: | Uwe Steinmann | Date: | Thu, 17 Feb 2000 20:30:31 +0000 |
| Subject: | cvs: /php4/ext/domxml domxml.c /php4/tests testdom | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10409@lists.php.net to get a copy of this message | ||
steinm Thu Feb 17 12:30:31 2000 EDT
Modified files:
/php4/ext/domxml domxml.c
/php4/tests testdom
Log:
- fixed bug if attribute value is entity
Index: php4/ext/domxml/domxml.c
diff -u php4/ext/domxml/domxml.c:1.15 php4/ext/domxml/domxml.c:1.16
--- php4/ext/domxml/domxml.c:1.15 Thu Feb 17 07:05:22 2000
+++ php4/ext/domxml/domxml.c Thu Feb 17 12:30:00 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domxml.c,v 1.15 2000/02/17 15:05:22 steinm Exp $ */
+/* $Id: domxml.c,v 1.16 2000/02/17 20:30:00 steinm Exp $ */
#include "php.h"
@@ -530,7 +530,8 @@
}
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 @@
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;
}
Index: php4/tests/testdom
diff -u php4/tests/testdom:1.8 php4/tests/testdom:1.9
--- php4/tests/testdom:1.8 Thu Feb 17 07:05:23 2000
+++ php4/tests/testdom Thu Feb 17 12:30:00 2000
@@ -38,7 +38,7 @@
<!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>