svn: /php/php-src/ branches/PHP_5_3/ext/simplexml/simplexml.c trunk/ext/simplexml/simplexml.c

From: Date: Thu, 25 Feb 2010 17:06:32 +0000
Subject: svn: /php/php-src/ branches/PHP_5_3/ext/simplexml/simplexml.c trunk/ext/simplexml/simplexml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-61928@lists.php.net to get a copy of this message
kalle Thu, 25 Feb 2010 17:06:32 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295507 Log: Added parameter parsing check to SimpleXMLElement::count() Changed paths: U php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c U php/php-src/trunk/ext/simplexml/simplexml.c Modified: php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c 2010-02-25 17:02:38 UTC (rev 295506) +++ php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c 2010-02-25 17:06:32 UTC (rev 295507) @@ -1863,13 +1863,17 @@ } /* }}} */ -/* {{{ 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); Modified: php/php-src/trunk/ext/simplexml/simplexml.c =================================================================== --- php/php-src/trunk/ext/simplexml/simplexml.c 2010-02-25 17:02:38 UTC (rev 295506) +++ php/php-src/trunk/ext/simplexml/simplexml.c 2010-02-25 17:06:32 UTC (rev 295507) @@ -1908,13 +1908,17 @@ } /* }}} */ -/* {{{ 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);

« previous php.cvs (#61928) next »