Skip to content

Commit

Permalink
Check if the returned value is string or not
Browse files Browse the repository at this point in the history
  • Loading branch information
xHeaven committed Nov 24, 2024
1 parent 6ce942f commit 023cfa5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Services/RateLimitService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ public function __construct(private readonly string $shopDomain)

public function getRateLimitInfo(): array
{
/** @var ?string $rateLimit */
$rateLimit = Redis::get($this->redisKey);

if ($rateLimit) {
if (is_string($rateLimit)) {
return Arr::wrap(json_decode($rateLimit, true));
}

Expand Down

0 comments on commit 023cfa5

Please sign in to comment.