Fix fatal error on Gravity Forms 3.0.2 upgrade - #49
Merged
Conversation
GF 3.0.2 added default values to GF_Field::get_field_label( $force_frontend_label = true, $value = ''). Our override declared the parameters as required, so PHP's LSP signature check triggered a fatal error on load. Reported at: https://wordpress.org/support/topic/fatal-error-when-updating-gravity-forms/ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Latest Fluent Forms added a required $formId argument to Submission::remove(); calling it without one now throws InvalidArgumentException, which surfaced as a PHP fatal during form submission in CI and broke the fluent-forms cypress spec. The mu-plugin runs only in the test environment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
GF_Field::get_field_label($force_frontend_label = true, $value = ''). Our override inGravity_Field.phpdeclared both params as required, so PHP's LSP signature check produces a fatal error on plugin load after the GF upgrade.Reported at: https://wordpress.org/support/topic/fatal-error-when-updating-gravity-forms/
Exact error:
Test plan
GF_Fieldat the 3.0.2 signature and loadsGravity_Field.php.bash tools/check-code-quality.sh phpstan— passes (169/169).bash tools/check-code-quality.sh codesniffer— passes.bash tools/check-code-quality.sh pest— passes.assets/node_modules); change is PHP-only so no JS impact.🤖 Generated with Claude Code