BUG Write current step to session when creating it

This commit is contained in:
Ingo Schommer 2012-10-10 12:49:56 +02:00
parent 5be0c052a5
commit ff49a0592f

View File

@ -195,10 +195,13 @@ abstract class MultiForm extends Form {
}
// Always fall back to creating a new step (in case the session or request data is invalid)
if(!$currentStep) {
if(!$currentStep || !$currentStep->ID) {
$currentStep = new $startStepClass();
$currentStep->SessionID = $this->session->ID;
$currentStep->write();
$this->session->CurrentStepID = $currentStep->ID;
$this->session->write();
$this->session->flushCache();
}
if($currentStep) $currentStep->setForm($this);