From 24a2107e035bf4658f611d070fc2b3f641191430 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 12 Oct 2018 17:01:52 +0200 Subject: [PATCH] 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 --- apps/sharebymail/lib/ShareByMailProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 26a9beefdf..b11a934937 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -980,7 +980,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']);