diff options
| author | Kalle Sommer Nielsen <kalle@php.net> | 2010-02-25 17:06:32 +0000 |
|---|---|---|
| committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-02-25 17:06:32 +0000 |
| commit | 8c634336f384fe3c599faacbacae44ff7e7cde90 (patch) | |
| tree | 8c387a42bbf2a10f820ebace3a40b400eee30504 | |
| parent | 7db6387a7f307a60c3b2d435bd026d052773f3ec (diff) | |
| download | php-git-8c634336f384fe3c599faacbacae44ff7e7cde90.tar.gz | |
Added parameter parsing check to SimpleXMLElement::count()
| -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); |
