Fixes broken session after merge 1178
What does this MR do?
Removes the type hint string
for third parameter $val
in FoodsaverGateway::setOption(...)
.
This type was introduced with !1178 (merged). It caused an error when an array was given instead of a string.
Furthermore the subsequent code was not executed, especially $_SESSION['client'] = array(...);
. This caused consecutive errors.
- https://sentry.io/share/issue/b6eec3141ecf481eabed46632146fd26/
- https://sentry.io/share/issue/2a71118e959447cdbefdd504d520ebd7/
The error occured for saved sessions, i.e. a user did a re-login. This MR comes with a unit test that simulates this. The test failed without the fix(/with parameter type hint) and passes with the fix (/without parameter type hint).
How confident are you it won't break things if deployed?
very
Links to related issues
Slack: https://yunity.slack.com/archives/C1T1ZM9A4/p1576949775023400
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s)) -
Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Chris Oelmueller