Skip to content

Commit

Permalink
Fixed #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Swader committed Jun 15, 2015
1 parent 0ada55f commit 09cd568
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#Changelog
All notable changes will be documented in this file

## 0.4.2

- [Internal] Fixed issue #14 - EntityIterator cursor bug

## 0.4.1

- [Internal] Added ArrayAccess to EntityIterator
Expand Down
7 changes: 4 additions & 3 deletions src/Entity/EntityIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public function key()

public function current()
{
while(!$this->offsetExists($this->cursor)) {
$this->next();
}
return $this->data[$this->cursor];
}

Expand Down Expand Up @@ -159,8 +162,6 @@ public function offsetSet($offset, $value)
*/
public function offsetUnset($offset)
{
if ($this->offsetExists($offset)) {
unset($this->data[$offset]);
}
unset($this->data[$offset]);
}
}

0 comments on commit 09cd568

Please sign in to comment.