MemoryArray undefined offset fix

This commit is contained in:
Alexander Pankratov 2020-05-11 20:28:01 +03:00
parent 6cf1ef504f
commit 8254360d2f
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class MemoryArray extends \ArrayIterator implements DbArray
public function offsetGet($offset): Promise
{
return call(fn() => parent::offsetGet($offset));
return call(fn() => parent::offsetExists($offset) ? parent::offsetGet($offset) : null);
}
public function offsetUnset($offset): Promise