MINOR: only call next() in iterator validation on initialisation or after reset NOT if current value is invalid (from r110190)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112834 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-19 01:27:51 +00:00
parent 12dd5b08e8
commit 6e8bf5617a

View File

@ -943,7 +943,7 @@ abstract class SS_Query implements Iterator {
* @return boolean
*/
public function valid() {
if(!$this->currentRecord) $this->next();
if(!$this->queryHasBegun) $this->next();
return $this->currentRecord !== false;
}