mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
12dd5b08e8
commit
6e8bf5617a
@ -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…
x
Reference in New Issue
Block a user