mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: only call next() in iterator validation on initialisation or after reset NOT if current value is invalid
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110190 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7bf9258dac
commit
3a210c397a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user