From 21f7ad42ef19ca3a89697d2f5ce2d27cc478b266 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 --- 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;