From 3c1d6e2782bd19ec41ab1c75237ec140fc0f3348 Mon Sep 17 00:00:00 2001 From: indykoning <15870933+indykoning@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:08:16 +0100 Subject: [PATCH] Fixed Undefined array key "token" --- src/Common/AuthenticatedHttpClient.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Common/AuthenticatedHttpClient.php b/src/Common/AuthenticatedHttpClient.php index 285ac6b..4d50ad0 100644 --- a/src/Common/AuthenticatedHttpClient.php +++ b/src/Common/AuthenticatedHttpClient.php @@ -72,6 +72,10 @@ public function sendRequest($httpMethod, $resourceName, array $query = [], array $this->authentication->getPassword() ); + if (($token['token'] ?? null) === null) { + throw new \AuthenticateException('Could not get token by username and password.'); + } + $this->authentication ->setJwtToken($token['token']); if (is_callable($this->authentication->tokenUpdateCallback)) {