]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix a case where "password_by_talk" was not a boolean (e.g. null or "0") and actively... 11851/head
authorMorris Jobke <hey@morrisjobke.de>
Fri, 12 Oct 2018 15:01:52 +0000 (17:01 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 15 Oct 2018 15:51:09 +0000 (17:51 +0200)
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 <hey@morrisjobke.de>
apps/sharebymail/lib/ShareByMailProvider.php

index 6cc27957bbe6109d0ad9e823cb1efa2939e5ab88..29b09c6fbad958b6d1a7962468cf2370ef5c51f2 100644 (file)
@@ -978,7 +978,7 @@ class ShareByMailProvider implements IShareProvider {
                $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']);