@@ -1614,9 +1614,7 @@ PHP_METHOD(SimpleXMLElement, getName)
16141614 xmlNodePtr node ;
16151615 int namelen ;
16161616
1617- if (zend_parse_parameters_none () == FAILURE ) {
1618- RETURN_THROWS ();
1619- }
1617+ ZEND_PARSE_PARAMETERS_NONE ();
16201618
16211619 sxe = Z_SXEOBJ_P (ZEND_THIS );
16221620
@@ -1900,9 +1898,7 @@ static zend_result sxe_object_cast(zend_object *readobj, zval *writeobj, int typ
19001898/* {{{ Returns the string content */
19011899PHP_METHOD (SimpleXMLElement , __toString )
19021900{
1903- if (zend_parse_parameters_none () == FAILURE ) {
1904- RETURN_THROWS ();
1905- }
1901+ ZEND_PARSE_PARAMETERS_NONE ();
19061902
19071903 zend_result rv = sxe_object_cast_ex (Z_OBJ_P (ZEND_THIS ), return_value , IS_STRING );
19081904 ZEND_IGNORE_VALUE (rv );
@@ -1950,9 +1946,7 @@ PHP_METHOD(SimpleXMLElement, count)
19501946{
19511947 php_sxe_object * sxe = Z_SXEOBJ_P (ZEND_THIS );
19521948
1953- if (zend_parse_parameters_none () == FAILURE ) {
1954- RETURN_THROWS ();
1955- }
1949+ ZEND_PARSE_PARAMETERS_NONE ();
19561950
19571951 RETURN_LONG (php_sxe_count_elements_helper (sxe ));
19581952}
@@ -1962,9 +1956,7 @@ PHP_METHOD(SimpleXMLElement, count)
19621956/* {{{ Rewind to first element */
19631957PHP_METHOD (SimpleXMLElement , rewind )
19641958{
1965- if (zend_parse_parameters_none () == FAILURE ) {
1966- RETURN_THROWS ();
1967- }
1959+ ZEND_PARSE_PARAMETERS_NONE ();
19681960
19691961 php_sxe_rewind_iterator (Z_SXEOBJ_P (ZEND_THIS ));
19701962}
@@ -1975,9 +1967,7 @@ PHP_METHOD(SimpleXMLElement, valid)
19751967{
19761968 php_sxe_object * sxe = Z_SXEOBJ_P (ZEND_THIS );
19771969
1978- if (zend_parse_parameters_none () == FAILURE ) {
1979- RETURN_THROWS ();
1980- }
1970+ ZEND_PARSE_PARAMETERS_NONE ();
19811971
19821972 RETURN_BOOL (!Z_ISUNDEF (sxe -> iter .data ));
19831973}
@@ -1988,9 +1978,7 @@ PHP_METHOD(SimpleXMLElement, current)
19881978{
19891979 php_sxe_object * sxe = Z_SXEOBJ_P (ZEND_THIS );
19901980
1991- if (zend_parse_parameters_none () == FAILURE ) {
1992- RETURN_THROWS ();
1993- }
1981+ ZEND_PARSE_PARAMETERS_NONE ();
19941982
19951983 if (Z_ISUNDEF (sxe -> iter .data )) {
19961984 zend_throw_error (NULL , "Iterator not initialized or already consumed" );
@@ -2008,9 +1996,7 @@ PHP_METHOD(SimpleXMLElement, key)
20081996 php_sxe_object * intern ;
20091997 php_sxe_object * sxe = Z_SXEOBJ_P (ZEND_THIS );
20101998
2011- if (zend_parse_parameters_none () == FAILURE ) {
2012- RETURN_THROWS ();
2013- }
1999+ ZEND_PARSE_PARAMETERS_NONE ();
20142000
20152001 if (Z_ISUNDEF (sxe -> iter .data )) {
20162002 zend_throw_error (NULL , "Iterator not initialized or already consumed" );
@@ -2031,9 +2017,7 @@ PHP_METHOD(SimpleXMLElement, key)
20312017/* {{{ Move to next element */
20322018PHP_METHOD (SimpleXMLElement , next )
20332019{
2034- if (zend_parse_parameters_none () == FAILURE ) {
2035- RETURN_THROWS ();
2036- }
2020+ ZEND_PARSE_PARAMETERS_NONE ();
20372021
20382022 php_sxe_move_forward_iterator (Z_SXEOBJ_P (ZEND_THIS ));
20392023}
@@ -2046,9 +2030,7 @@ PHP_METHOD(SimpleXMLElement, hasChildren)
20462030 php_sxe_object * child ;
20472031 xmlNodePtr node ;
20482032
2049- if (zend_parse_parameters_none () == FAILURE ) {
2050- RETURN_THROWS ();
2051- }
2033+ ZEND_PARSE_PARAMETERS_NONE ();
20522034
20532035 if (Z_ISUNDEF (sxe -> iter .data ) || sxe -> iter .type == SXE_ITER_ATTRLIST ) {
20542036 RETURN_FALSE ;
@@ -2071,9 +2053,7 @@ PHP_METHOD(SimpleXMLElement, getChildren)
20712053{
20722054 php_sxe_object * sxe = Z_SXEOBJ_P (ZEND_THIS );
20732055
2074- if (zend_parse_parameters_none () == FAILURE ) {
2075- RETURN_THROWS ();
2076- }
2056+ ZEND_PARSE_PARAMETERS_NONE ();
20772057
20782058 if (Z_ISUNDEF (sxe -> iter .data ) || sxe -> iter .type == SXE_ITER_ATTRLIST ) {
20792059 return ; /* return NULL */
0 commit comments