Skip to content

Instantly share code, notes, and snippets.

@nhp
Forked from Vinai/gist:1205913
Created September 4, 2012 08:42
Show Gist options
  • Save nhp/3618629 to your computer and use it in GitHub Desktop.
Save nhp/3618629 to your computer and use it in GitHub Desktop.
Bug with store cookie handling in Magento up to 1.6 if specifying a non-default store MAGE_RUN_CODE
--- a/app/code/core/Mage/Core/Model/App.php
+++ b/app/code/core/Mage/Core/Model/App.php
@@ -511,11 +511,7 @@ class Mage_Core_Model_App
if ($this->_currentStore == $store) {
$store = $this->getStore($store);
- if ($store->getWebsite()->getDefaultStore()->getId() == $store->getId()) {
- $this->getCookie()->delete(Mage_Core_Model_Store::COOKIE_NAME);
- } else {
- $this->getCookie()->set(Mage_Core_Model_Store::COOKIE_NAME, $this->_currentStore, true);
- }
+ $this->getCookie()->set(Mage_Core_Model_Store::COOKIE_NAME, $this->_currentStore, true);
}
return $this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment