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

Using ACF get_field causes infinite recursion #133

Open
spiralni opened this issue May 7, 2021 · 0 comments
Open

Using ACF get_field causes infinite recursion #133

spiralni opened this issue May 7, 2021 · 0 comments

Comments

@spiralni
Copy link

spiralni commented May 7, 2021

I am trying to get the secret key configured in a setting using the ACF plugin (https://www.advancedcustomfields.com/)
But I notice, when the auth token is received and the get_field is called, there is an infinite loop that breaks the site.

 add_filter( 'graphql_jwt_auth_secret_key', function() {
            return get_field( 'jwt_auth_secret_key', 'option' );
        });

Stacktrace:


[07-May-2021 03:34:29 UTC] PHP Fatal error:  Uncaught Error: Maximum function nesting level of '256' reached, aborting! in C:\MAMP\htdocs\drnoxdev\wp-includes\plugin.php:181
Stack trace:
#0 C:\MAMP\htdocs\drnoxdev\wp-content\plugins\advanced-custom-fields-pro\includes\api\api-helpers.php(2588): apply_filters('acf/pre_load_po...', NULL, 'option')
#1 C:\MAMP\htdocs\drnoxdev\wp-content\plugins\advanced-custom-fields-pro\includes\api\api-template.php(23): acf_get_valid_post_id('option')

Any comment?

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

No branches or pull requests

1 participant