cvs: php4 /ext/domxml php_domxml.c
| From: | Christian Stocker | Date: | Fri, 11 Oct 2002 14:00:12 +0000 |
| Subject: | cvs: php4 /ext/domxml php_domxml.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-14833@lists.php.net to get a copy of this message | ||
chregu Fri Oct 11 10:00:12 2002 EDT
Modified files:
/php4/ext/domxml php_domxml.c
Log:
node->attributes returns null, if there are no attributes.
Index: php4/ext/domxml/php_domxml.c
diff -u php4/ext/domxml/php_domxml.c:1.211 php4/ext/domxml/php_domxml.c:1.212
--- php4/ext/domxml/php_domxml.c:1.211 Mon Sep 9 16:32:49 2002
+++ php4/ext/domxml/php_domxml.c Fri Oct 11 10:00:12 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_domxml.c,v 1.211 2002/09/09 20:32:49 chregu Exp $ */
+/* $Id: php_domxml.c,v 1.212 2002/10/11 14:00:12 chregu Exp $ */
/* TODO
* - Support Notation Nodes
@@ -2576,37 +2576,17 @@
zval *id, *attrs;
xmlNode *nodep;
int ret;
-#ifdef oldstyle_for_libxml_1_8_7
- xmlAttr *attr;
-#endif
DOMXML_PARAM_NONE(nodep, id, le_domxmlnodep);
ret = node_attributes(&attrs, nodep TSRMLS_CC);
if ( ret == -1) {
- RETURN_FALSE;
+ return NULL;
}
if ( ret > -1) {
*return_value = *attrs;
FREE_ZVAL(attrs);
}
-
-
-#ifdef oldstyle_for_libxml_1_8_7
- attr = nodep->properties;
- if (!attr) {
- RETURN_FALSE;
- }
-
- if (array_init(return_value) == FAILURE) {
- RETURN_FALSE;
- }
-
- while (attr) {
- add_assoc_string(return_value, (char *) attr->name, xmlNodeGetContent(attr), 1);
- attr = attr->next;
- }
-#endif
}
/* }}} */