diff options
author | Christian Stocker <chregu@php.net> | 2002-10-11 14:00:12 +0000 |
---|---|---|
committer | Christian Stocker <chregu@php.net> | 2002-10-11 14:00:12 +0000 |
commit | 820e5b766a295a0c2bb1ed97b8f268291b3ace1c (patch) | |
tree | b996674f85a1aa10dcde5baad2a26bba2d783a62 /ext/domxml/php_domxml.c | |
parent | e06550f85314a535d09fedcef795634bff0c30e5 (diff) | |
download | php-git-820e5b766a295a0c2bb1ed97b8f268291b3ace1c.tar.gz |
node->attributes returns null, if there are no attributes.
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r-- | ext/domxml/php_domxml.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index ce98a315cc..1795c39d62 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -2576,37 +2576,17 @@ PHP_FUNCTION(domxml_node_attributes) 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 } /* }}} */ |