From 2461a56d764bc3b5ed6532e69091fd31ac2d4188 Mon Sep 17 00:00:00 2001 From: Dominik Vitt Date: Mon, 22 Oct 2018 17:54:54 +0200 Subject: [PATCH] Fixed issue #10162: new visit on a survey with token deletes last entry --- application/helpers/frontend_helper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/helpers/frontend_helper.php b/application/helpers/frontend_helper.php index 89a289d13bd..bf06cdb3569 100644 --- a/application/helpers/frontend_helper.php +++ b/application/helpers/frontend_helper.php @@ -2047,6 +2047,11 @@ function killSurveySession($iSurveyID) unset($_SESSION['survey_'.$iSurveyID]); // Force EM to refresh LimeExpressionManager::SetDirtyFlag(); + + // unsetting LEMsingleton from session so new survey execution would start with new LEM instance + // SetDirtyFlag() method doesn't reset LEM properly + // this solution fixes bug: https://bugs.limesurvey.org/view.php?id=10162 + unset($_SESSION["LEMsingleton"]); } /**