-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Steps to reproduce the issue
- Update php.ini file to set post_max_size to 0 (and restart PHP/Apache)
- Attempt to upload any extension from the Upload Package File tab on the Manage Extensions page
Expected result
Extension should be uploaded and deployed successfully.
Actual result
Upload fails instant with the following message:
"The selected file cannot be uploaded as it is bigger than the maximum upload size."
System information (as much as possible)
Ubuntu 22.04.4 LTS
Apache/2.4.52 (Ubuntu)
PHP 8.3.8 (using FPM)
Joomla 5.3.2
Additional comments
The problem appears to be within Joomla\Filesystem\Helper::getFileUploadMaxSize(), and specifically this clause:
$maxSize === 0
$maxSize is previously assign as follows, which results in a float value according to the return type of self::parseSize():
$maxSize = self::parseSize(\ini_get('post_max_size'));
Comparing $maxSize to an integer value (0) consequently fails. Hence, the return value of the function is 0, preventing any file being uploaded.