File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -1873,27 +1873,16 @@ PHP_METHOD(SimpleXMLElement, __toString)
18731873
18741874static zend_result php_sxe_count_elements_helper (php_sxe_object * sxe , zend_long * count ) /* {{{ */
18751875{
1876- xmlNodePtr node ;
1877- zval data ;
1878-
18791876 * count = 0 ;
18801877
1881- ZVAL_COPY_VALUE (& data , & sxe -> iter .data );
1882- ZVAL_UNDEF (& sxe -> iter .data );
1883-
1884- node = php_sxe_reset_iterator (sxe , 0 );
1878+ xmlNodePtr node = php_sxe_reset_iterator_no_clear_iter_data (sxe , 0 );
18851879
18861880 while (node )
18871881 {
18881882 (* count )++ ;
18891883 node = php_sxe_iterator_fetch (sxe , node -> next , 0 );
18901884 }
18911885
1892- if (!Z_ISUNDEF (sxe -> iter .data )) {
1893- zval_ptr_dtor (& sxe -> iter .data );
1894- }
1895- ZVAL_COPY_VALUE (& sxe -> iter .data , & data );
1896-
18971886 return SUCCESS ;
18981887}
18991888/* }}} */
You can’t perform that action at this time.
0 commit comments