diff options
Diffstat (limited to 'ext/simplexml/simplexml.c')
| -rw-r--r-- | ext/simplexml/simplexml.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index fca160e3ff..f1843b497f 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1863,13 +1863,17 @@ static int sxe_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */ } /* }}} */ -/* {{{ proto int SimpleXMLIterator::count() +/* {{{ proto int SimpleXMLElement::count() Get number of child elements */ SXE_METHOD(count) { long count = 0; php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); + if (zend_parse_parameters_none() == FAILURE) { + return; + } + php_sxe_count_elements_helper(sxe, &count TSRMLS_CC); RETURN_LONG(count); |
