diff --git a/lib/consent_manager_frontend.php b/lib/consent_manager_frontend.php index 76edc06..531a3b8 100644 --- a/lib/consent_manager_frontend.php +++ b/lib/consent_manager_frontend.php @@ -64,10 +64,12 @@ public function setDomain($domain) } } foreach ($this->cookiegroups as $cookiegroup) { - foreach ($cookiegroup['cookie_uids'] as $uid) { - if (isset($this->cache['cookies'][$_SESSION['consent_manager']['clang']][$uid])) { - $this->cookies[$uid] = $this->cache['cookies'][$_SESSION['consent_manager']['clang']][$uid]; - $this->scripts[$uid] = $this->cache['cookies'][$_SESSION['consent_manager']['clang']][$uid]['script']; + if (isset($cookiegroup['cookie_uids'])) { + foreach ($cookiegroup['cookie_uids'] as $uid) { + if (isset($this->cache['cookies'][$_SESSION['consent_manager']['clang']][$uid])) { + $this->cookies[$uid] = $this->cache['cookies'][$_SESSION['consent_manager']['clang']][$uid]; + $this->scripts[$uid] = $this->cache['cookies'][$_SESSION['consent_manager']['clang']][$uid]['script']; + } } } $this->scripts = array_filter($this->scripts);