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 @field with number as second parameter always returns the string case #70

Closed
erip2 opened this issue Mar 2, 2022 · 0 comments · Fixed by #82
Closed

Using @field with number as second parameter always returns the string case #70

erip2 opened this issue Mar 2, 2022 · 0 comments · Fixed by #82

Comments

@erip2
Copy link

erip2 commented Mar 2, 2022

I'm trying to get a field of a specific post, but when I use the directive like this @field('location', $element->ID) it returns the get_field function like this:

<?= get_field('location')[3205]; ?>

This happens because when Util::parse($expression); is used, it makes all the parameters to string and the check on line 68 is !is_string() when actually should be is_numeric().

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 a pull request may close this issue.

1 participant