Skip to content
Snippets Groups Projects
Commit bd3e2664 authored by Bart Visscher's avatar Bart Visscher
Browse files

Merge pull request #3688 from roha4000/fix_upload_max_filesize

upload_max_filesize = 0 not possible if post_max_size is not 0
parents d699ee98 a06d901e
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment