Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Saving stepData on Session - issues #11

Description

@marko85to

Hi, thanks for your extension, it's really nice.

I have experienced some issues in the "saveStep" function and I thought I would share it with everyone.
Basically I have noticed that the data stored in the session was not always updating when submitting the forms.
I've had to unset the variable in the session before updating the data, as you can see below:

WizardBehavior.php

protected function saveStep($step, $data)
    {
        if (!isset($this->_session[$this->_stepDataKey][$step])) {
            $this->_session[$this->_stepDataKey][$step] = new \ArrayObject;
        }
        unset($this->_session[$this->_stepDataKey][$step]);
        $this->_session[$this->_stepDataKey][$step][] = $data;
    }

After this update things seems working fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions