diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-29 04:07:34 -0700 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-29 04:07:34 -0700 |
commit | bd3e266408f8d313d0a1d545e16a85bf6ef31500 (patch) | |
tree | 45988293e0645976b5eff1a10e158f530813a30a /lib | |
parent | d699ee9845b17ddb0945f263e4370e453ef48684 (diff) | |
parent | a06d901e3782a58f3f98bac4eca81430e56089ae (diff) | |
download | nextcloud-server-bd3e266408f8d313d0a1d545e16a85bf6ef31500.tar.gz nextcloud-server-bd3e266408f8d313d0a1d545e16a85bf6ef31500.zip |
Merge pull request #3688 from roha4000/fix_upload_max_filesize
upload_max_filesize = 0 not possible if post_max_size is not 0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/helper.php b/lib/helper.php index a315c640d1a..1860a55fc8f 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -787,9 +787,9 @@ class OC_Helper { $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); $freeSpace = \OC\Files\Filesystem::free_space($dir); - if ($upload_max_filesize == 0 and $post_max_size == 0) { + if ((int)$upload_max_filesize === 0 and (int)$post_max_size === 0) { $maxUploadFilesize = \OC\Files\FREE_SPACE_UNLIMITED; - } elseif ($upload_max_filesize === 0 or $post_max_size === 0) { + } elseif ((int)$upload_max_filesize === 0 or (int)$post_max_size === 0) { $maxUploadFilesize = max($upload_max_filesize, $post_max_size); //only the non 0 value counts } else { $maxUploadFilesize = min($upload_max_filesize, $post_max_size); |