aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStefan Cherniakov <luka-sama@pm.me>2024-09-02 15:02:50 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-09-03 17:23:31 +0200
commit457eaee2b31c1baa7ec7386f1b53f84e8a87f146 (patch)
treebc1555a0cbac9ec0c95b4ec03876b790cea92e6c /lib
parentd633b9bce641846c3925613c04c6e6489c008248 (diff)
downloadnextcloud-server-457eaee2b31c1baa7ec7386f1b53f84e8a87f146.tar.gz
nextcloud-server-457eaee2b31c1baa7ec7386f1b53f84e8a87f146.zip
fix(files_sharing): Add missing check for null & use bool instead of int for reminder_sent field
Signed-off-by: Stefan Cherniakov <luka-sama@pm.me>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index a5f5ca715ce..3ea429dfe3d 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -98,7 +98,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
$qb->setValue('expiration', $qb->createNamedParameter($expirationDate, 'datetime'));
}
- $qb->setValue('reminder_sent', $qb->createNamedParameter($share->getReminderSent() ? 1 : 0, IQueryBuilder::PARAM_INT));
+ $qb->setValue('reminder_sent', $qb->createNamedParameter($share->getReminderSent(), IQueryBuilder::PARAM_BOOL));
} elseif ($share->getShareType() === IShare::TYPE_GROUP) {
//Set the GID of the group we share with
$qb->setValue('share_with', $qb->createNamedParameter($share->getSharedWith()));
@@ -225,7 +225,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
->set('expiration', $qb->createNamedParameter($expirationDate, IQueryBuilder::PARAM_DATE))
->set('note', $qb->createNamedParameter($share->getNote()))
->set('accepted', $qb->createNamedParameter($share->getStatus()))
- ->set('reminder_sent', $qb->createNamedParameter($share->getReminderSent()))
+ ->set('reminder_sent', $qb->createNamedParameter($share->getReminderSent(), IQueryBuilder::PARAM_BOOL))
->execute();
} elseif ($share->getShareType() === IShare::TYPE_GROUP) {
$qb = $this->dbConn->getQueryBuilder();
@@ -1071,7 +1071,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
$share->setProviderId($this->identifier());
$share->setHideDownload((int)$data['hide_download'] === 1);
- $share->setReminderSent((int)$data['reminder_sent'] === 1);
+ $share->setReminderSent((bool)$data['reminder_sent']);
return $share;
}