Skip to content

Commit

Permalink
Merge pull request #115 from outl1ne/bugfix/empty-var-check
Browse files Browse the repository at this point in the history
Bugfix/empty var check
  • Loading branch information
Tarpsvo authored Apr 25, 2022
2 parents 4c75bf1 + 8fc6670 commit c26ffe3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/NovaSettingsStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c26ffe3

Please sign in to comment.