The problem is for($i;... as nothing is happening to $i there. Change it to $i=0, warning should go away. It is a little weird that the warning appears on the last line of the for-loop, but that's probably how the parsing worked out.
HTH,
SSF
Comment on Re: Useless use of private variable in void context