Call reset() each time before looping through the tasks:
$tasks->reset();
while ($task = $tasks->each() {
...
}
public each ( )
File:
Driver.php
Project:
DSNS-LAB/Dmail
File:
List.php
Project:
jubinpatel/horde