You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show an error when a submit is cut off by max_input_vars - #3626
When a form sends more values than PHP's max_input_vars, PHP drops the extra ones. The hidden item_key field comes last, so it is lost. process_entry() then returns early, no entry is saved, and the visitor sees "It looks like you've already submitted that."
What changed
process_entry() now checks a POST that has form_id but no item_key. If the POST has at least max_input_vars values, it adds a form error. The form shows again with the visitor's values and says it has more fields than the server accepts. Requests under the limit behave as before.
Not changed: the AJAX part of the issue (send action and the nonce first). With AJAX on, the JS already falls back to a full submit, which now shows this error.
How it was verified
Two PHPUnit tests added: a POST at the limit gets the error; a POST under the limit is left alone.
Not run locally: local PHPUnit here is on a PHPUnit version the WP test lib doesn't support. Relying on CI (run tests, run analysis).
No before/after screenshot yet: max_input_vars can't be changed in the preview env.
PHP drops every input var past max_input_vars, so item_key never arrives and the visitor saw the failed/duplicate message. Add a form error instead.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
We reviewed changes in c5b435b...3acab5e on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
No before/after image yet: the preview env can't set max_input_vars. Left franky-review off until someone with a PHP-FPM site can capture it. PHPUnit and analysis are running via the run tests and run analysis labels.
The reason will be displayed to describe this comment to others. Learn more.
Call to an undefined method test_FrmEntriesController::assertArrayNotHasKey()
The method you are trying to call is not defined, which can result in a fatal error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
When a form sends more values than PHP's
max_input_vars, PHP drops the extra ones. The hiddenitem_keyfield comes last, so it is lost.process_entry()then returns early, no entry is saved, and the visitor sees "It looks like you've already submitted that."What changed
process_entry()now checks a POST that hasform_idbut noitem_key. If the POST has at leastmax_input_varsvalues, it adds a form error. The form shows again with the visitor's values and says it has more fields than the server accepts. Requests under the limit behave as before.Not changed: the AJAX part of the issue (send
actionand the nonce first). With AJAX on, the JS already falls back to a full submit, which now shows this error.How it was verified
run tests,run analysis).max_input_varscan't be changed in the preview env.Fixes Strategy11/formidable-pro#6922
🤖 Generated with Claude Code