mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-23 10:47:16 +00:00
The upload_max_filesize and post_max_size values from php.ini can use K, M, or G suffixes (e.g. 2048K, 8M). The previous code cast these values directly to int and then multiplied by 1024*1024, ignoring the unit suffix entirely. This caused incorrect comparisons like 2048K being treated as greater than 8M. Add a convertToBytes() helper that properly parses the PHP shorthand notation into bytes before comparing. Fixes #3085
91 KiB
91 KiB