Skip to content

Instantly share code, notes, and snippets.

@AndresInSpace
Created August 20, 2018 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndresInSpace/2d0d30f03248839a94d5b760a053a43e to your computer and use it in GitHub Desktop.
Save AndresInSpace/2d0d30f03248839a94d5b760a053a43e to your computer and use it in GitHub Desktop.
FIX Magento 1.9x Initial Session Creation (CORE BUG)
FILE PATH: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
- 'domain' => $cookie->getConfigDomain(),
+ 'domain' => $cookie->getDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
- if (isset($cookieParams['domain'])) {
- $cookieParams['domain'] = $cookie->getDomain();
- }
+ //if (isset($cookieParams['domain'])) {
+ //$cookieParams['domain'] = $cookie->getDomain();
+ //}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment