]> source.dussan.org Git - nextcloud-server.git/commitdiff
in case $_POST['itemSourceName'] does not exist we simply default it to null
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 1 Aug 2014 07:10:14 +0000 (09:10 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 11 Aug 2014 15:42:37 +0000 (17:42 +0200)
core/ajax/share.php

index 4b5a6cd664fa63c984b58d0da4e6edf61be3416f..37f374c499243ae9bab9c6cdc9385247926c7f79 100644 (file)
@@ -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)
                                        );