aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/QuotaPlugin.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
index 687b05e86cb..b37325430e7 100644
--- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
@@ -250,11 +250,13 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
}
$ocLength = $req->getHeader('OC-Total-Length');
- if (is_numeric($length) && is_numeric($ocLength)) {
- return max($length, $ocLength);
+ if (!is_numeric($ocLength)) {
+ return $length;
}
-
- return $length;
+ if (!is_numeric($length)) {
+ return $ocLength;
+ }
+ return max($length, $ocLength);
}
/**