? Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
17 Jun 2017

Summary of Changes

With this PR I removed the current value for memory_limit from the max_upload_size calculation in JUtility::getMaxUploadSize. The memory_limit does NOT affect the maximum upload size of files as files are handled as streams which have a very low memory impact, therefore the value should not be taken into account.

Testing Instructions

We stumbled upon this issue while running the Joomla unit test suite in cli environment with memory_limit = -1 which means "unlimited memory".
Because of the way how the memory calculation in JUtility works, -1 is returned as the "smallest" and therefore limiting value, causing the unit test to fail.

So, in order to test this PR, you should run the JFormFieldFileTest (which uses JUtility in it's rendering) in a CLI environment with memory_limit = -1 - you'll get an error like this:

There was 1 error:

  1. JFormFieldFileTest::testGetInput
    Undefined offset: -9223372036854775808

Afterwards, apply the patch and re-run the test, it will work now.

Expected result

The test suite should work.

Actual result

Error message, see above

Documentation Changes Required

none

avatar SniperSister SniperSister - open - 17 Jun 2017
avatar SniperSister SniperSister - change - 17 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jun 2017
Category Libraries
avatar yvesh yvesh - test_item - 17 Jun 2017 - Tested successfully
avatar yvesh
yvesh - comment - 17 Jun 2017

I have tested this item successfully on 96c30bd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16741.

avatar rdeutz rdeutz - test_item - 17 Jun 2017 - Tested successfully
avatar rdeutz
rdeutz - comment - 17 Jun 2017

I have tested this item successfully on 96c30bd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16741.

avatar zero-24 zero-24 - change - 17 Jun 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-06-17 17:50:02
Closed_By zero-24
Labels Added: ?
avatar zero-24 zero-24 - close - 17 Jun 2017
avatar zero-24 zero-24 - merge - 17 Jun 2017
avatar zero-24
zero-24 - comment - 17 Jun 2017

Merged Thanks!

avatar bobby375
bobby375 - comment - 6 Jul 2017

I get the error "Maximum PHP file upload size is too small" and cannot upload the template files.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Jul 2017

Please ask help on the forums. This repository concerns Joomla coding.

Add a Comment

Login with GitHub to post a comment