summaryrefslogtreecommitdiffstats
path: root/settings/ajax/setquota.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/ajax/setquota.php')
-rw-r--r--settings/ajax/setquota.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php
index 64a686e83d7..c83430bfcfb 100644
--- a/settings/ajax/setquota.php
+++ b/settings/ajax/setquota.php
@@ -8,7 +8,7 @@
OC_JSON::checkSubAdminUser();
OCP\JSON::callCheck();
-$username = isset($_POST["username"])?$_POST["username"]:'';
+$username = isset($_POST["username"]) ? (string)$_POST["username"] : '';
if(($username === '' && !OC_User::isAdminUser(OC_User::getUser()))
|| (!OC_User::isAdminUser(OC_User::getUser())
@@ -19,7 +19,7 @@ if(($username === '' && !OC_User::isAdminUser(OC_User::getUser()))
}
//make sure the quota is in the expected format
-$quota=$_POST["quota"];
+$quota= (string)$_POST["quota"];
if($quota !== 'none' and $quota !== 'default') {
$quota= OC_Helper::computerFileSize($quota);
$quota=OC_Helper::humanFileSize($quota);