diff options
author | EA117 <admin@ea117.com> | 2019-08-28 23:34:52 -0500 |
---|---|---|
committer | EA117 <admin@ea117.com> | 2019-08-28 23:34:52 -0500 |
commit | 29d43670430f3edad2366ddbca15d1b34315ce1d (patch) | |
tree | fe80c9274ccbcba68ca7b253f357741bc8ed2632 /phpBB/phpbb/plupload | |
parent | 73537bcc7d8b10fe77e91068d494c1181b11d6c7 (diff) | |
download | forums-29d43670430f3edad2366ddbca15d1b34315ce1d.tar forums-29d43670430f3edad2366ddbca15d1b34315ce1d.tar.gz forums-29d43670430f3edad2366ddbca15d1b34315ce1d.tar.bz2 forums-29d43670430f3edad2366ddbca15d1b34315ce1d.tar.xz forums-29d43670430f3edad2366ddbca15d1b34315ce1d.zip |
[ticket/16141] plupload chunk_size when 'unlimited' is involved.
Change get_chunk_size() calculation to correctly calculate limits without
letting a zero "unlimited" value always win. Also ensure get_chunk_size()
can only return zero if all of the limits were in fact set to unlimited.
PHPBB3-16141
Diffstat (limited to 'phpBB/phpbb/plupload')
-rw-r--r-- | phpBB/phpbb/plupload/plupload.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php index 601b3fb440..f9403938ed 100644 --- a/phpBB/phpbb/plupload/plupload.php +++ b/phpBB/phpbb/plupload/plupload.php @@ -305,14 +305,14 @@ class plupload if ($limit_upload > 0) { - $max = min($limit_upload, $max ? $max : $limit_upload); + $max = min($limit_upload, ($max ? $max : $limit_upload)); } $limit_post = $this->php_ini->getBytes('post_max_size'); if ($limit_post > 0) { - $max = min($limit_post, $max ? $max : $limit_post); + $max = min($limit_post, ($max ? $max : $limit_post)); } // $config['max_filesize'] is not a limiter to chunk size. |