Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gw-all-fields-template.php: Fixed a fatal error with the snippet and Nested Forms. #751

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saifsultanc
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2460908266/59240?folderId=3808239

Summary

The All Fields Template is causing a fatal error:
Warning: Undefined variable $input_ids in /.../gw-all-fields-template/gw-all-fields-template.php on line 201

The issue is down to the $input_ids only getting initialized in the preceding else block (and not the if). This leads to potential scenarios of tapping in on that value/variable even though it does not exist.

BEFORE:
Screenshot 2024-01-09 at 9 27 11 AM

AFTER:
Screenshot 2024-01-09 at 9 26 38 AM

@saifsultanc saifsultanc added the bug Something isn't working label Jan 9, 2024
Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below

gravity-forms/gw-all-fields-template.php Show resolved Hide resolved
Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claygriffiths claygriffiths marked this pull request as ready for review January 16, 2024 22:10
Copy link

Warnings
⚠️ When ready, don't forget to request reviews on this pull request from your fellow wizards.

Generated by 🚫 dangerJS against bed66f6

@saifsultanc
Copy link
Contributor Author

@claygriffiths Ready to merge it. But the PHPCS issue pointing to a file that hasn't been touched on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants