mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
in case $_POST['itemSourceName'] does not exist we simply default it to null
This commit is contained in:
parent
dc6180427c
commit
6d06a765f4
1 changed files with 2 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|
|||
try {
|
||||
$shareType = (int)$_POST['shareType'];
|
||||
$shareWith = $_POST['shareWith'];
|
||||
$itemSourceName = isset($_POST['itemSourceName']) ? $_POST['itemSourceName'] : null;
|
||||
if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') {
|
||||
$shareWith = null;
|
||||
}
|
||||
|
|
@ -41,7 +42,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|
|||
$shareType,
|
||||
$shareWith,
|
||||
$_POST['permissions'],
|
||||
$_POST['itemSourceName'],
|
||||
$itemSourceName,
|
||||
(!empty($_POST['expirationDate']) ? new \DateTime($_POST['expirationDate']) : null)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue