Skip to content

Conversation

@richard67
Copy link
Contributor

Pull Request for Issue joomla/joomla-cms#45905

Summary of Changes

This pull request (PR) changes the internal variables which are used in the Helper::getFileUploadMaxSize() method to calculate the result to be integer by casting the result of the self::parseSize calls (which always return floats as being the result of round but only can have integer values) to integer before using integer comparisons on these variables.

Currently the $maxSize === 0 check is always false as $maxSize is always a float.

Testing Instructions

  1. Update php.ini file to set post_max_size to 0 (and restart PHP/Apache)
  2. 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."

Documentation Changes Required

None.

@johnrix
Copy link

johnrix commented Aug 14, 2025

Tested changes locally and confirmed these have the desired outcome.

@rdeutz rdeutz merged commit 556e740 into joomla-framework:3.x-dev Aug 14, 2025
10 checks passed
@richard67 richard67 deleted the 3.x-dev-fix-post-max-size-zero branch August 14, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants