Skip to content

Commit

Permalink
[PLA-2080] Check for empty values (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
enjinabner authored Nov 17, 2024
1 parent e366637 commit dcd6953
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Support/ClaimProbabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public static function getCacheKey(string $code): string
/**
* Get the probabilities for a code.
*/
public static function getProbabilities(string $code): array
public static function getProbabilities(?string $code): array
{
return Cache::get(
return empty($code) ? [] : Cache::get(
static::getCacheKey($code),
static::getProbabilitiesFromDB($code)
);
Expand Down

0 comments on commit dcd6953

Please sign in to comment.