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 to keep log cleaner #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix to keep log cleaner #305

wants to merge 1 commit into from

Conversation

dseegers
Copy link

No description provided.

@dseegers
Copy link
Author

I saw that

if( $field['return_format'] == 'url' )

Was throwing a lot of debug log messages. So maybe it is better to change it to:

if( isset($field['return_format']) && $field['return_format'] == 'url' )

[28-May-2020 12:58:21 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 12:58:21 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 12:58:21 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 12:58:21 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 12:58:21 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 12:58:27 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 13:12:26 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 13:12:26 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 13:12:26 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 13:12:26 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207
[28-May-2020 13:12:26 UTC] PHP Notice:  Undefined index: return_format in /Users/daan/Documents/Development/sites/xxxx/www/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-link.php on line 207

@elliotcondon
Copy link
Contributor

Hi @dseegers

Thanks for the PR.

In theory, It should not be possible for a Link field to be missing the "return_format" property. This prop is added to all Link fields when they are first loaded.

I suspect another variable or bug at play that could be causing the corrupt Link field data.

If it's not too much to ask, can you please spin up a fresh WP site in "Local by Flywheel" and try to replicate the issue? Please keep the default theme active and edit the functions.php file with any extra logic needed.​

​​If you can replicate the issue, please export the site (from flywheel app, right click the site and click "export") and attach to your next reply. ​I'll import this and get to work replicating / testing the issue :)

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