From 3c6c843fe66e3e705f4c0fe900aef2a5d8b2ba12 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 18 Aug 2023 19:30:40 +0200 Subject: [PATCH] Fix: memory db settings --- src/Client.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 96c96ca..4403778 100644 --- a/src/Client.php +++ b/src/Client.php @@ -167,8 +167,13 @@ class Client 'redis' => new Settings\Database\Redis(), }; $settingsObject->setDb($type); - self::getSettingsFromArray($value[$value['type']], $type); - unset($value['type'], $value['mysql'], $value['memory'], $value['postgres'], $value['redis']); + if ($value['type'] === 'memory') { + self::getSettingsFromArray([], $type); + } else { + self::getSettingsFromArray($value[$value['type']], $type); + } + + unset($value[$value['type']], $value['type'],); if (count($value) === 0) { continue; }