summaryrefslogtreecommitdiffstats
path: root/lib/private/share/share.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/share/share.php')
-rw-r--r--lib/private/share/share.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 1308c99f804..e59cd3bc8c5 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -2243,7 +2243,13 @@ class Share extends Constants {
} else {
// TODO Don't check if inside folder
$result['parent'] = $checkReshare['id'];
- $result['expirationDate'] = min($expirationDate, $checkReshare['expiration']);
+
+ $result['expirationDate'] = $expirationDate;
+ // $checkReshare['expiration'] could be null and then is always less than any value
+ if(isset($checkReshare['expiration']) && $checkReshare['expiration'] < $expirationDate) {
+ $result['expirationDate'] = $checkReshare['expiration'];
+ }
+
// only suggest the same name as new target if it is a reshare of the
// same file/folder and not the reshare of a child
if ($checkReshare[$column] === $itemSource) {