[TYPO3-core] RFC #16022: Size calculation function can only deal with integers

Susanne Moog info at susannemoog.de
Sat Oct 16 23:42:03 CEST 2010


On 16.10.2010 22:58, Benjamin Mack wrote:
> Hey,
> 
> this is a SVN patch request.
> 
> Branches: trunk, 4.4
> 
> Type: bugfix
> 
> BT reference: http://bugs.typo3.org/view.php?id=16022
> 
> Problem:
> The conversion function t3lib_div::getBytesFromSizeMeasurement($limit)
> casts the $limit function to integer. Usually you have a value from
> php.ini like upload_max_file = 2M, which works fine with that function.
> 
> However, if you have values like upload_max_file = 2.5M, the t3lib_div
> function fails.
> 
> Solution:
> Replace the intval() calls with doubleval() calls.

+1 by reading and testing, nobrainer imho.

susanne


More information about the TYPO3-team-core mailing list