Skip to content

Throw a warning when max_input_vars value is too low.#287

Merged
infograf768 merged 2 commits intojoomla-projects:developfrom
infograf768:maxinputvars
Mar 18, 2016
Merged

Throw a warning when max_input_vars value is too low.#287
infograf768 merged 2 commits intojoomla-projects:developfrom
infograf768:maxinputvars

Conversation

@infograf768
Copy link
Contributor

This PR, based partly on code from @Valc in #276
implements a Warning when the php.ini directive max_input_vars is lower than required to edit an ini file. It also prevents editing the file except under Source.

One should get:

screen shot 2016-03-17 at 16 37 42

The default on most systems is 1000 if the directive is not set at all.
To test, add 50 lines to admin en-GB.ini.
Modify the directive and test again.

The reason we can't use $item->total is that lines with comments are also counted as variables.

@Valc
Copy link
Contributor

Valc commented Mar 17, 2016

Well done.
Now is easier to adjust if they leave more variables to consider, as we start taking the total number of lines in the file.

Regards.

infograf768 added a commit that referenced this pull request Mar 18, 2016
Throw a warning when max_input_vars value is too low.
@infograf768 infograf768 merged commit 8749fe2 into joomla-projects:develop Mar 18, 2016
@infograf768
Copy link
Contributor Author

Thanks for testing

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.

2 participants