From dc45e6c19a03d70d80f426a31dcf31814cf8bab4 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Tue, 3 Jul 2012 09:25:02 +0000 Subject: [PATCH] // Fix bug with switchlanguage durring install git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16187 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Tools.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/Tools.php b/classes/Tools.php index 50d0beabf..9360247ed 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -377,6 +377,11 @@ class ToolsCore { if (!$context) $context = Context::getContext(); + + // Install call the dispatcher and so the switchLanguage + // Stop this method by checking the cookie + if (!isset($context->cookie)) + return; if (($iso = Tools::getValue('isolang')) && Validate::isLanguageIsoCode($iso) && ($id_lang = (int)Language::getIdByIso($iso))) $_GET['id_lang'] = $id_lang;