diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-06-12 23:51:53 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2021-06-16 11:31:11 +0200 |
commit | b5186b01f1bc65ac8c4228e9e86cea2064883808 (patch) | |
tree | e252d884b5156c796fd1ca04fa657158adea72f2 /lib/Service | |
parent | 1d2287b10866d4f049266a41dcaa5a1c8e674e86 (diff) |
🚑 Item: set id to null in clone function
This is done to set the id to null BEFORE resetting the updated fields.
The purpose of this is to avoid explicitly adding a NULL id into the DB,
which provokes an error in some DBMS (like postgres).
Fixes #1375
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/ShareService.php | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index 17db4e53b..552e1d9a4 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -110,7 +110,6 @@ class ShareService // Duplicate item & initialize fields $sharedItem = clone $item; - $sharedItem->setId(null); $sharedItem->setUnread(true); $sharedItem->setStarred(false); $sharedItem->setSharedBy($userId); |