Skip to content

Commit

Permalink
🚑 fixed config error
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Feb 16, 2022
1 parent 211e28e commit c413911
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Auth/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c413911

Please sign in to comment.