kbsali/php-redmine-api

Redundant request when limit is over 200

Opened this issue · 0 comments

In AbstractApi.php, the function retrieveData makes a redundant final request if the limit is defined over 200.

On line 357, the if statement to reset $limit to zero and end the while loop is currently like this:

$newDataSet['offset'] >= $newDataSet['total_count']

This way, the while loop continues for another request whose result will be definitely empty.

I think it should be like this:

$newDataSet['limit'] + $newDataSet['offset'] >= $newDataSet['total_count']

Thanks.