User tests: Successful: Unsuccessful:
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.
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:
- JFormFieldFileTest::testGetInput
Undefined offset: -9223372036854775808
Afterwards, apply the patch and re-run the test, it will work now.
The test suite should work.
Error message, see above
none
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
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:
?
|
Merged Thanks!
I get the error "Maximum PHP file upload size is too small" and cannot upload the template files.
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.