You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is the definite chance that a value set on a different object will be returned when it is retrieved from a different one that doesn't come from the same call
To Reproduce
// assign a value to the mocker object$mocked->value1->sub_value = 2;
echo$mocked->value1->sub_value . PHP_EOL;
// returns int(2)// now assign that same sub_value to another object or array$mocked->assoc_arr['sub_value'] = 'Must be different value';
echo$mocked->assoc_arr['sub_value'];
// returns 2// butecho$mocked->sub_value;
// returns 2echo$mocked->value1->sub_value;
// returns 2
Expected behavior
This should not do that and has a problem to do with the flat structure of the VarStore and the way in which the values are resolved.
The VarStore should be structured as the way in which the values should be called i.e.:
// calling $mocked->sub_value; // would return 'null' or 'mocked->sub_value';
or
$mocked->value1->sub_value; // gives 2
and
$mocked->assoc_arr['sub_value']; // will give the string
The text was updated successfully, but these errors were encountered:
Describe the bug
There is the definite chance that a value set on a different object will be returned when it is retrieved from a different one that doesn't come from the same call
To Reproduce
Expected behavior
This should not do that and has a problem to do with the flat structure of the VarStore and the way in which the values are resolved.
The VarStore should be structured as the way in which the values should be called i.e.:
The text was updated successfully, but these errors were encountered: