BUGFIX getvValueFromOtherStep() can't return proper data

- 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
This commit is contained in:
Nic Horstmeier 2020-11-11 09:43:28 -06:00
parent 41d8927602
commit 0371ca995a
No known key found for this signature in database
GPG Key ID: 1A9DCDAF97E29D8A

View File

@ -475,7 +475,7 @@ class MultiFormStep extends DataObject
{ {
// load the steps in the cache, if this one doesn't exist // load the steps in the cache, if this one doesn't exist
if (!array_key_exists('steps_' . $fromStep, $this->step_data_cache)) { 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) { if ($steps) {
foreach ($steps as $step) { foreach ($steps as $step) {