Skip to content

Commit

Permalink
ConfigurableModel::hasConfiguration() returns false on empty arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Jul 24, 2024
1 parent 86b42ac commit 2d869c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 4.x Series

## Unreleased
##### 2024-XX-YY

- Changed the `ConfigurableModel::hasConfiguration()` trait to return false on empty arrays as well (until now, only `null` was considered as no config)

## 4.1.0
##### 2024-07-11

Expand Down
2 changes: 1 addition & 1 deletion Traits/ConfigurableModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function configuration(): ?array

public function hasConfiguration(): bool
{
return null !== $this->{static::$configurationFieldName};
return !empty($this->{static::$configurationFieldName});
}

public function doesntHaveConfiguration(): bool
Expand Down

0 comments on commit 2d869c7

Please sign in to comment.