aboutsummaryrefslogtreecommitdiffstats
path: root/core/ajax/share.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-08-01 09:10:14 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-08-01 09:10:14 +0200
commit6d06a765f4cf5ba194f892b6674eeaa6bc6f93c0 (patch)
treea447123781646cff8a7be47c0ce040104044b20f /core/ajax/share.php
parentdc6180427c8b0729ce00fb1cae210e34b173e005 (diff)
downloadnextcloud-server-6d06a765f4cf5ba194f892b6674eeaa6bc6f93c0.tar.gz
nextcloud-server-6d06a765f4cf5ba194f892b6674eeaa6bc6f93c0.zip
in case $_POST['itemSourceName'] does not exist we simply default it to null
Diffstat (limited to 'core/ajax/share.php')
-rw-r--r--core/ajax/share.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 4b5a6cd664f..37f374c4992 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -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)
);