Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix a case where "password_by_talk" was not a boolean (e.g. null or "…
…0") and actively cast it to a boolean

This was the error message that we have seen:

```
Argument 1 passed to OC\\Share20\\Share::setSendPasswordByTalk() must be of the type boolean, null given, called in apps/sharebymail/lib/ShareByMailProvider.php on line 981
```

Signed-off-by: Morris Jobke <[email protected]>
  • Loading branch information
MorrisJobke committed Oct 15, 2018
commit 9454de50b4190051cd3f8db0f233afe40f460e2f
2 changes: 1 addition & 1 deletion apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ protected function createShareObject($data) {
$share->setShareTime($shareTime);
$share->setSharedWith($data['share_with']);
$share->setPassword($data['password']);
$share->setSendPasswordByTalk($data['password_by_talk']);
$share->setSendPasswordByTalk((bool)$data['password_by_talk']);

if ($data['uid_initiator'] !== null) {
$share->setShareOwner($data['uid_owner']);
Expand Down