diff --git a/apps/workflowengine/lib/Check/FileSize.php b/apps/workflowengine/lib/Check/FileSize.php index c1ee1d85ae965..41c8f0d8b570b 100644 --- a/apps/workflowengine/lib/Check/FileSize.php +++ b/apps/workflowengine/lib/Check/FileSize.php @@ -75,7 +75,9 @@ protected function getFileSizeFromHeader() { $size = $this->request->getHeader('OC-Total-Length'); if ($size === '') { - if (in_array($this->request->getMethod(), ['POST', 'PUT'])) { + // Try fallback for upload methods + $method = $this->request->getMethod(); + if (in_array($method, ['POST', 'PUT'], true)) { $size = $this->request->getHeader('Content-Length'); } }