Skip to content

Commit

Permalink
fix: Warning: Trying to access array offset on value of type null
Browse files Browse the repository at this point in the history
  • Loading branch information
hphoeksma authored and Nikdro committed Jan 4, 2023
1 parent 56e6d6f commit 0de0d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/JavaScriptController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function ($key) {
array_map(function ($dimension) { return current($dimension);}, $filteredDimensions)
);

$cookie = isset($this->request->getHttpRequest()->getCookieParams()[$this->cookieName]) ? json_decode($this->request->getHttpRequest()->getCookieParams()[$this->cookieName], true) : null;
$cookie = !empty($this->request->getHttpRequest()->getCookieParams()) && isset($this->request->getHttpRequest()->getCookieParams()[$this->cookieName]) ? json_decode($this->request->getHttpRequest()->getCookieParams()[$this->cookieName], true) : null;
$consents = $cookie['consents'][$dimensionIdentifier] ?? $cookie['consents']['default'] ?? $cookie['consents'] ?? [];
$siteNode = $this->contextFactory->create(['dimensions' => $dimensions])->getCurrentSiteNode();

Expand Down

0 comments on commit 0de0d58

Please sign in to comment.