From 023cfa5501d539e4e014dbc043ba000723b64f78 Mon Sep 17 00:00:00 2001 From: Mark <14284867+xHeaven@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:48:25 +0100 Subject: [PATCH] Check if the returned value is string or not --- src/Services/RateLimitService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Services/RateLimitService.php b/src/Services/RateLimitService.php index 062e015..9ff6ef2 100644 --- a/src/Services/RateLimitService.php +++ b/src/Services/RateLimitService.php @@ -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)); }