diff --git a/infra/Adapters/Repositories/SessionBasketRepository.php b/infra/Adapters/Repositories/SessionBasketRepository.php index 4754abec..8dd18651 100644 --- a/infra/Adapters/Repositories/SessionBasketRepository.php +++ b/infra/Adapters/Repositories/SessionBasketRepository.php @@ -45,8 +45,9 @@ class SessionBasketRepository implements BasketRepository if (is_array($decoded)) { return $this->serializer->fromArray($decoded); } - } catch (\Throwable $e) { - // Ignore and fall back to null + } catch (\Throwable) { + // Ignore corrupted session payload and fall back to null + return null; } } }