Skip to content

Fixes broken session after merge 1178

Sven Oos requested to merge SO-hotfix-beta-login-broken-after-merge into master

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.

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

Merge request reports