From 7904b3d87f4f1cfc8620eea82f8d2ea6b3f6efc8 Mon Sep 17 00:00:00 2001 From: Joel Male Date: Tue, 29 Aug 2023 21:38:53 +1000 Subject: [PATCH] feat: fix server errors with no internet connection or when the api is down --- lib/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Client.php b/lib/Client.php index 854c956..abf1e7c 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -374,7 +374,7 @@ public function loadFlags() { $payload = json_decode($this->localFlags(), true); - if (array_key_exists("detail", $payload)) { + if ($payload && array_key_exists("detail", $payload)) { throw new Exception($payload["detail"]); }