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

Fix the way the form id is obtained to prevent multiple PHP warnings … #3

Merged
merged 1 commit into from Dec 3, 2020
Merged

Conversation

samuelaguilera
Copy link
Contributor

Instead of getting the form id directly using its property, the plugin is trying to get it from form fields, something that is not needed and causes some notices and warnings. Example:

Notice: Undefined offset: 0 in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 42

Notice: Trying to access array offset on value of type null in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 42

Warning: strpos(): Empty needle in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 77

Warning: strpos(): Empty needle in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 77

Warning: strpos(): Empty needle in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 77

Warning: strpos(): Empty needle in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 77

Warning: strpos(): Empty needle in /home/user/www/public_html/wp-content/plugins/where-is-gravity-forms-master/where-is-gf.php on line 77

This PR fix the issue.

@andywarren andywarren merged commit d698784 into andywarren:master Dec 3, 2020
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.

None yet

2 participants