@@ -1382,31 +1382,12 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
1382
1382
intern -> dit_type = dit_type ;
1383
1383
switch (dit_type ) {
1384
1384
case DIT_LimitIterator : {
1385
- zval * tmp_offset , * tmp_count ;
1386
1385
intern -> u .limit .offset = 0 ; /* start at beginning */
1387
1386
intern -> u .limit .count = -1 ; /* get all */
1388
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "O|zz " , & zobject , ce_inner , & tmp_offset , & tmp_count ) == FAILURE ) {
1387
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "O|ll " , & zobject , ce_inner , & intern -> u . limit . offset , & intern -> u . limit . count ) == FAILURE ) {
1389
1388
zend_restore_error_handling (& error_handling TSRMLS_CC );
1390
1389
return NULL ;
1391
1390
}
1392
- if (tmp_offset && Z_TYPE_P (tmp_offset ) != IS_NULL ) {
1393
- if (Z_TYPE_P (tmp_offset ) != IS_LONG ) {
1394
- zend_throw_exception (spl_ce_OutOfRangeException , "offset param must be of type int" , 0 TSRMLS_CC );
1395
- zend_restore_error_handling (& error_handling TSRMLS_CC );
1396
- return NULL ;
1397
- } else {
1398
- intern -> u .limit .offset = Z_LVAL_P (tmp_offset );
1399
- }
1400
- }
1401
- if (tmp_count && Z_TYPE_P (tmp_count ) != IS_NULL ) {
1402
- if (Z_TYPE_P (tmp_count ) != IS_LONG ) {
1403
- zend_throw_exception (spl_ce_OutOfRangeException , "count param must be of type int" , 0 TSRMLS_CC );
1404
- zend_restore_error_handling (& error_handling TSRMLS_CC );
1405
- return NULL ;
1406
- } else {
1407
- intern -> u .limit .count = Z_LVAL_P (tmp_count );
1408
- }
1409
- }
1410
1391
if (intern -> u .limit .offset < 0 ) {
1411
1392
zend_throw_exception (spl_ce_OutOfRangeException , "Parameter offset must be >= 0" , 0 TSRMLS_CC );
1412
1393
zend_restore_error_handling (& error_handling TSRMLS_CC );
0 commit comments