* @link https://www.oxidmodule.com */ declare(strict_types=1); namespace D3\SidCookieFix\modules\core; use OxidEsales\Eshop\Core\Registry; class Session_sidcookiefix extends Session_sidcookiefix_parent { protected function setSessionCookie($sessionId): void { if ($this->_getSessionUseCookies()) { if (!$this->_allowSessionStart()) { Registry::getUtilsServer()->setOxCookie($this->getName(), null); } else { $sCookieSessid = Registry::getUtilsServer()->getOxCookie($this->getName()); if (!$sCookieSessid || $sessionId != $sCookieSessid) { Registry::getUtilsServer()->setOxCookie( $this->getName(), $sessionId ); } } } } }