Browse Source

Added parameter parsing check to SimpleXMLElement::count()

experimental/the_5_4_that_isnt_5_4
Kalle Sommer Nielsen 17 years ago
parent
commit
8c634336f3
  1. 6
      ext/simplexml/simplexml.c

6
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);

Loading…
Cancel
Save