From c4139115a0e408f025d5b9cf23583f8decd73f2a Mon Sep 17 00:00:00 2001 From: Michael Darko Date: Wed, 16 Feb 2022 17:01:58 +0000 Subject: [PATCH] :ambulance: fixed config error --- src/Auth/Core.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Auth/Core.php b/src/Auth/Core.php index 22870ed..8deabaf 100644 --- a/src/Auth/Core.php +++ b/src/Auth/Core.php @@ -128,16 +128,19 @@ protected static function leafDbConnect() * Set auth config * * @param string|array $config The auth config key or array of config - * @param string $value The value if $config is a string + * @param mixed $value The value if $config is a string */ - public static function config($config, ?string $value = null) + public static function config($config, $value = null) { if (is_array($config)) { foreach ($config as $key => $configValue) { static::config($key, $configValue); } } else { - if (!$value) return static::$settings[$config] ?? null; + if ($value === null) { + return static::$settings[$config] ?? null; + } + static::$settings[$config] = $value; } }