first = nodep->children;
if (!first) {
- RETURN_FALSE;
+ return;
}
DOMXML_RET_OBJ(rv, first, &ret);
last = nodep->last;
if (!last) {
- RETURN_FALSE;
+ return;
}
DOMXML_RET_OBJ(rv, last, &ret);
ns = nodep->ns;
if (!ns) {
- RETURN_EMPTY_STRING();
+ /* return NULL if no ns is given...*/
+ return;
}
if (ns->href) {
{
zval *id, *attrs;
xmlNode *nodep;
+ int ret;
#ifdef oldstyle_for_libxml_1_8_7
xmlAttr *attr;
#endif
DOMXML_PARAM_NONE(nodep, id, le_domxmlnodep);
-
- if (node_attributes(&attrs, nodep TSRMLS_CC) < 0)
+ ret = node_attributes(&attrs, nodep TSRMLS_CC);
+ if ( ret == -1) {
RETURN_FALSE;
+ }
- *return_value = *attrs;
- FREE_ZVAL(attrs);
+ if ( ret > -1) {
+ *return_value = *attrs;
+ FREE_ZVAL(attrs);
+ }
+
#ifdef oldstyle_for_libxml_1_8_7
attr = nodep->properties;
return -1;
attr = nodep->properties;
if (!attr)
- return -1;
+ return -2;
/* create an php array for the children */
MAKE_STD_ZVAL(*attributes);