Skip to content

Commit

Permalink
BUGFIX: correctly test for settings
Browse files Browse the repository at this point in the history
test for the existence of the `host`, `protocol`, `token_auth` and `idSite` settings
  • Loading branch information
PRGfx authored Jun 30, 2020
1 parent 97efb90 commit e5cb6ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/Reporting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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';

Expand Down

0 comments on commit e5cb6ac

Please sign in to comment.