1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00

- Attribues don't have children

This commit is contained in:
Marcus Boerger
2005-10-29 20:37:59 +00:00
parent 9ee8a78cef
commit a5a9cd2f0f

View File

@@ -106,7 +106,7 @@ SPL_METHOD(SimpleXMLIterator, hasChildren)
php_sxe_object *child;
xmlNodePtr node;
if (!sxe->iter.data) {
if (!sxe->iter.data || sxe->iter.type == SXE_ITER_ATTRLIST) {
RETURN_FALSE;
}
child = php_sxe_fetch_object(sxe->iter.data TSRMLS_CC);
@@ -128,7 +128,7 @@ SPL_METHOD(SimpleXMLIterator, getChildren)
{
php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
if (!sxe->iter.data) {
if (!sxe->iter.data || sxe->iter.type == SXE_ITER_ATTRLIST) {
return; /* return NULL */
}
return_value->type = IS_OBJECT;