@@ -1029,7 +1029,7 @@ PHP_METHOD(MultipleIterator, rewind)
1029
1029
zend_hash_internal_pointer_reset_ex (& intern -> storage , & intern -> pos );
1030
1030
while ((element = zend_hash_get_current_data_ptr_ex (& intern -> storage , & intern -> pos )) != NULL && !EG (exception )) {
1031
1031
it = & element -> obj ;
1032
- zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_rewind , "rewind" , NULL );
1032
+ zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), Z_OBJCE_P ( it ) -> iterator_funcs_ptr ? & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_rewind : NULL , "rewind" , NULL );
1033
1033
zend_hash_move_forward_ex (& intern -> storage , & intern -> pos );
1034
1034
}
1035
1035
}
@@ -1051,7 +1051,7 @@ PHP_METHOD(MultipleIterator, next)
1051
1051
zend_hash_internal_pointer_reset_ex (& intern -> storage , & intern -> pos );
1052
1052
while ((element = zend_hash_get_current_data_ptr_ex (& intern -> storage , & intern -> pos )) != NULL && !EG (exception )) {
1053
1053
it = & element -> obj ;
1054
- zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_next , "next" , NULL );
1054
+ zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), Z_OBJCE_P ( it ) -> iterator_funcs_ptr ? & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_next : NULL , "next" , NULL );
1055
1055
zend_hash_move_forward_ex (& intern -> storage , & intern -> pos );
1056
1056
}
1057
1057
}
@@ -1080,7 +1080,7 @@ PHP_METHOD(MultipleIterator, valid)
1080
1080
zend_hash_internal_pointer_reset_ex (& intern -> storage , & intern -> pos );
1081
1081
while ((element = zend_hash_get_current_data_ptr_ex (& intern -> storage , & intern -> pos )) != NULL && !EG (exception )) {
1082
1082
it = & element -> obj ;
1083
- zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_valid , "valid" , & retval );
1083
+ zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), Z_OBJCE_P ( it ) -> iterator_funcs_ptr ? & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_valid : NULL , "valid" , & retval );
1084
1084
1085
1085
if (!Z_ISUNDEF (retval )) {
1086
1086
valid = (Z_TYPE (retval ) == IS_TRUE );
@@ -1116,7 +1116,7 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_
1116
1116
zend_hash_internal_pointer_reset_ex (& intern -> storage , & intern -> pos );
1117
1117
while ((element = zend_hash_get_current_data_ptr_ex (& intern -> storage , & intern -> pos )) != NULL && !EG (exception )) {
1118
1118
it = & element -> obj ;
1119
- zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_valid , "valid" , & retval );
1119
+ zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), Z_OBJCE_P ( it ) -> iterator_funcs_ptr ? & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_valid : NULL , "valid" , & retval );
1120
1120
1121
1121
if (!Z_ISUNDEF (retval )) {
1122
1122
valid = Z_TYPE (retval ) == IS_TRUE ;
@@ -1127,9 +1127,9 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_
1127
1127
1128
1128
if (valid ) {
1129
1129
if (SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT == get_type ) {
1130
- zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_current , "current" , & retval );
1130
+ zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), Z_OBJCE_P ( it ) -> iterator_funcs_ptr ? & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_current : NULL , "current" , & retval );
1131
1131
} else {
1132
- zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_key , "key" , & retval );
1132
+ zend_call_method_with_0_params (Z_OBJ_P (it ), Z_OBJCE_P (it ), Z_OBJCE_P ( it ) -> iterator_funcs_ptr ? & Z_OBJCE_P (it )-> iterator_funcs_ptr -> zf_key : NULL , "key" , & retval );
1133
1133
}
1134
1134
if (Z_ISUNDEF (retval )) {
1135
1135
zend_throw_exception (spl_ce_RuntimeException , "Failed to call sub iterator method" , 0 );
0 commit comments