X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=fbfef1fb90ff9a3149239415b07f970b58bc8830;hb=d5212f304fd52a8390e06e1fcc9180a1562588ba;hp=67c99c9d244f073192203306b446864205346d79;hpb=91d69e12e1d2e00953cae3c153e37f3d36e5903c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 67c99c9d24..fbfef1fb90 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -373,6 +373,15 @@ if ( $wgResourceLoaderMaxQueryLength === false ) { unset( $suhosinMaxValueLength ); } +// Ensure the minimum chunk size is less than PHP upload limits or the maximum +// upload size. +$wgMinUploadChunkSize = min( + $wgMinUploadChunkSize, + $wgMaxUploadSize, + wfShorthandToInteger( ini_get( 'upload_max_filesize' ), 1e100 ), + wfShorthandToInteger( ini_get( 'post_max_size' ), 1e100 ) - 1024 # Leave room for other parameters +); + /** * Definitions of the NS_ constants are in Defines.php * @private