aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/ajax/upload.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 4b015e4d1f5..733ed95974f 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -34,9 +34,10 @@ if (empty($_POST['dirToken'])) {
}
// The token defines the target directory (security reasons)
+ $sharedItem = array_pop($sharedItem);
$dir = sprintf(
"/%s/%s",
- array_pop($sharedItem)['path'],
+ $sharedItem['path'],
isset($_POST['subdir']) ? $_POST['subdir'] : ''
);