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
 }
 /* }}} */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to