summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax/delete.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/ajax/delete.php')
-rw-r--r--apps/files_trashbin/ajax/delete.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index 72553fa0ee0..812c5029698 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -7,7 +7,7 @@ OCP\JSON::callCheck();
$folder = isset($_POST['dir']) ? $_POST['dir'] : '/';
// "empty trash" command
-if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
+if (isset($_POST['allfiles']) && (string)$_POST['allfiles'] === 'true'){
$deleteAll = true;
if ($folder === '/' || $folder === '') {
OCA\Files_Trashbin\Trashbin::deleteAll();
@@ -19,7 +19,7 @@ if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
}
else {
$deleteAll = false;
- $files = $_POST['files'];
+ $files = (string)$_POST['files'];
$list = json_decode($files);
}