From e5cb6ac9ca1335a36ac8e98c42171e90e7400a2f Mon Sep 17 00:00:00 2001 From: "M. Klatte" Date: Tue, 30 Jun 2020 19:54:01 +0200 Subject: [PATCH] BUGFIX: correctly test for settings test for the existence of the `host`, `protocol`, `token_auth` and `idSite` settings --- Classes/Service/Reporting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Service/Reporting.php b/Classes/Service/Reporting.php index bf9b661..111e953 100644 --- a/Classes/Service/Reporting.php +++ b/Classes/Service/Reporting.php @@ -92,7 +92,7 @@ public function callAPI( bool $useCache = true, string $sitename = '' ): ?array { - if (!empty($this->settings['host']) && !empty($this->settings['token_auth'] && !empty($this->settings['token_auth']))) { + if (!empty($this->settings['host']) && !empty($this->settings['protocol']) && !empty($this->settings['token_auth']) && !empty($this->settings['idSite'])) { $apiCallUrl = $this->buildApiCallUrl($sitename, array_merge($arguments, ['method' => $methodName])); return $this->request($apiCallUrl, $useCache); } @@ -114,7 +114,7 @@ public function getNodeStatistics( array $arguments = [], $useCache = true ): ?AbstractDataResult { - if (!empty($this->settings['host']) && !empty($this->settings['token_auth'] && !empty($this->settings['token_auth']))) { + if (!empty($this->settings['host']) && !empty($this->settings['protocol']) && !empty($this->settings['token_auth']) && !empty($this->settings['idSite'])) { $contextProperties = $node->getContext()->getProperties(); $contextProperties['workspaceName'] = 'live';