Proper handle null cases and default to true
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
56a2512581
commit
1c25919cf1
|
@ -183,6 +183,9 @@ class DefaultShareProvider implements IShareProvider {
|
|||
throw new ShareNotFound();
|
||||
}
|
||||
|
||||
$mailSendValue = $share->getMailSend();
|
||||
$data['mail_send'] = ($mailSendValue === null) ? true : $mailSendValue;
|
||||
|
||||
$share = $this->createShare($data);
|
||||
return $share;
|
||||
}
|
||||
|
@ -837,7 +840,7 @@ class DefaultShareProvider implements IShareProvider {
|
|||
->setShareType((int)$data['share_type'])
|
||||
->setPermissions((int)$data['permissions'])
|
||||
->setTarget($data['file_target'])
|
||||
->setMailSend(true);
|
||||
->setMailSend((bool)$data['mail_send']);
|
||||
|
||||
$shareTime = new \DateTime();
|
||||
$shareTime->setTimestamp((int)$data['stime']);
|
||||
|
|
Loading…
Reference in New Issue