From 8254360d2f52f6423b9bb1390fdd599aa39e19a5 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 11 May 2020 20:28:01 +0300 Subject: [PATCH] MemoryArray undefined offset fix --- src/danog/MadelineProto/Db/MemoryArray.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/Db/MemoryArray.php b/src/danog/MadelineProto/Db/MemoryArray.php index 18132189..5951a32a 100644 --- a/src/danog/MadelineProto/Db/MemoryArray.php +++ b/src/danog/MadelineProto/Db/MemoryArray.php @@ -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