diff --git a/src/Models/Config.php b/src/Models/Config.php index 81e7fa08..48a8a397 100644 --- a/src/Models/Config.php +++ b/src/Models/Config.php @@ -98,6 +98,9 @@ public static function getValue( // Catch the case it is intentionally set to null if (Arr::has($configCache, $cacheKey)) { $result = Arr::get($configCache, $cacheKey); + if ($result === false) { + $result = $options['default'] ?? null; + } return (bool) $options['decrypt'] && is_string($result) ? static::decrypt($result) : $result; } @@ -118,7 +121,7 @@ public static function getValue( $result = $resultObject ? $resultObject->value : ($options['default'] ?? null); if ($options['cache'] ?? true) { - Arr::set($configCache, $cacheKey, $result); + Arr::set($configCache, $cacheKey, $resultObject ? $result : false); Cache::driver('rapidez:multi')->set('magento.config', $configCache); }