@@ -217,7 +217,7 @@ class ResultSet implements ResultSetInterface
*/
public function valid()
{
- if (isset($this->_results[$this->_index])) {
+ if ($this->_results[$this->_index] !== null) {
$this->_current = $this->_results[$this->_index];
return true;
}
@@ -385,7 +385,7 @@ class CounterCacheBehaviorTest extends TestCase
protected function _getUser($id = 1)
- return $this->user->find('all')->where(['id' => $id])->first();
+ return $this->user->get($id);
/**