@@ -1290,7 +1290,6 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
1290
1290
return NULL ;
1291
1291
}
1292
1292
1293
- intern -> dit_type = dit_type ;
1294
1293
switch (dit_type ) {
1295
1294
case DIT_LimitIterator : {
1296
1295
intern -> u .limit .offset = 0 ; /* start at beginning */
@@ -1364,6 +1363,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
1364
1363
if (zend_parse_parameters_none () == FAILURE ) {
1365
1364
return NULL ;
1366
1365
}
1366
+ intern -> dit_type = DIT_AppendIterator ;
1367
1367
zend_replace_error_handling (EH_THROW , spl_ce_InvalidArgumentException , & error_handling );
1368
1368
spl_instantiate (spl_ce_ArrayIterator , & intern -> u .append .zarrayit );
1369
1369
zend_call_method_with_0_params (Z_OBJ (intern -> u .append .zarrayit ), spl_ce_ArrayIterator , & spl_ce_ArrayIterator -> constructor , "__construct" , NULL );
@@ -1385,8 +1385,6 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
1385
1385
zend_throw_exception_ex (spl_ce_InvalidArgumentException , 0 , "Illegal mode " ZEND_LONG_FMT , mode );
1386
1386
return NULL ;
1387
1387
}
1388
- intern -> u .regex .mode = mode ;
1389
- intern -> u .regex .regex = zend_string_copy (regex );
1390
1388
1391
1389
zend_replace_error_handling (EH_THROW , spl_ce_InvalidArgumentException , & error_handling );
1392
1390
intern -> u .regex .pce = pcre_get_compiled_regex_cache (regex );
@@ -1396,6 +1394,8 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
1396
1394
/* pcre_get_compiled_regex_cache has already sent error */
1397
1395
return NULL ;
1398
1396
}
1397
+ intern -> u .regex .mode = mode ;
1398
+ intern -> u .regex .regex = zend_string_copy (regex );
1399
1399
php_pcre_pce_incref (intern -> u .regex .pce );
1400
1400
break ;
1401
1401
}
@@ -1420,6 +1420,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
1420
1420
break ;
1421
1421
}
1422
1422
1423
+ intern -> dit_type = dit_type ;
1423
1424
if (inc_refcount ) {
1424
1425
Z_ADDREF_P (zobject );
1425
1426
}
0 commit comments