Skip to content

Commit

Permalink
BUGFIX getvValueFromOtherStep() can't return proper data
Browse files Browse the repository at this point in the history
- BUGFIX getValueFromOtherStep() calls protected MultiForm::$session
  - Use the provided `MultiForm::getMultiFormSession()` method to get the proper result.
- BUGFIX getValueFromOtherStep() only fetches subclass steps for the session disallowing access to other class step data
  • Loading branch information
muskie9 committed Nov 11, 2020
1 parent 41d8927 commit 0371ca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/MultiFormStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public function getValueFromOtherStep($fromStep, $key)
{
// load the steps in the cache, if this one doesn't exist
if (!array_key_exists('steps_' . $fromStep, $this->step_data_cache)) {
$steps = self::get()->filter('SessionID', $this->form->session->ID);
$steps = MultiFormStep::get()->filter('SessionID', $this->form->getMultiFormSession()->ID);

if ($steps) {
foreach ($steps as $step) {
Expand Down

0 comments on commit 0371ca9

Please sign in to comment.