Skip to content

Commit

Permalink
Fixing caching for empty arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelmtz authored Jul 18, 2024
1 parent e70f9eb commit 95ec40f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Repository/DefaultUnleashRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function findFeature(string $featureName): ?Feature
public function getFeatures(): iterable
{
$features = $this->getCachedFeatures();
if ($features === null) {
if (empty($features)) {

Check failure on line 118 in src/Repository/DefaultUnleashRepository.php

View workflow job for this annotation

GitHub Actions / Static analysis (8.3)

Never use empty(), always check specifically for what you want.
$features = $this->fetchFeatures();
}

Expand Down

0 comments on commit 95ec40f

Please sign in to comment.