From 123e3fadfdcbfaf842fba0abe27cb44174b7be4b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 12 May 2020 15:49:40 +0300 Subject: [PATCH] Remove unavailable method call --- src/danog/MadelineProto/Db/MysqlArray.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/danog/MadelineProto/Db/MysqlArray.php b/src/danog/MadelineProto/Db/MysqlArray.php index 6452629f..ab267516 100644 --- a/src/danog/MadelineProto/Db/MysqlArray.php +++ b/src/danog/MadelineProto/Db/MysqlArray.php @@ -74,10 +74,10 @@ class MysqlArray implements DbArray foreach ((array) $value as $key => $item) { $counter++; if ($counter % 100 === 0) { - yield $instance->offsetSetAsync($key, $item); + yield from $instance->offsetSet($key, $item); Logger::log("Converting database. $counter/$total", Logger::WARNING); } else { - $instance->offsetSetAsync($key, $item); + $instance->offsetSet($key, $item); } } @@ -136,18 +136,18 @@ class MysqlArray implements DbArray *

* @param $value * - * @return Promise + * @return void * @throws \Throwable */ - public function offsetSet($index, $value): void + public function offsetSet($index, $value) { if ($this->getCache($index) === $value) { return; } $this->setCache($index, $value); - $this->request(" + yield $this->request(" INSERT INTO `{$this->table}` SET `key` = :index, `value` = :value ON DUPLICATE KEY UPDATE `value` = :value