From 4944de62ceaf641bebca2f0d5bb82ff88a012979 Mon Sep 17 00:00:00 2001 From: Marttin Notta Date: Mon, 25 Apr 2022 14:46:11 +0300 Subject: [PATCH 1/2] Check if value is defined instead of checking only for positive values --- src/NovaSettingsStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NovaSettingsStore.php b/src/NovaSettingsStore.php index 5b5f5b1..3c0451e 100644 --- a/src/NovaSettingsStore.php +++ b/src/NovaSettingsStore.php @@ -76,7 +76,7 @@ public function getSettings(array $settingKeys = null, array $defaults = []) return collect($settingKeys)->flatMap(function ($settingKey) use ($settings, $defaults) { $settingValue = $settings[$settingKey] ?? null; - if (!empty($settingValue)) { + if (isset($settingValue)) { $this->cache[$settingKey] = $settingValue; return [$settingKey => $settingValue]; } else { From 8fc667065742560eba65a7b8c0373e5e8221c56f Mon Sep 17 00:00:00 2001 From: Marttin Notta Date: Mon, 25 Apr 2022 14:50:08 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e91e94..2de5d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.5.5] - 25-04-2022 + +### Changed + +- Changed `empty` check to `isset` when loading settings to allow negative but defined values. + ## [3.5.4] - 08-04-2022 ### Changed