Home › Forums › General Issues › get_field returning null after update › Reply To: get_field returning null after update
@robwent I definitely see where you’re coming from. I think part of the issue is that we underestimated the number of folks that are using
get_field() to get values for fields that don’t technically exist or to get fields unrelated to ACF.
The other part of the issue is that this was part of a security fix, which we would typically prefer to hold off on disclosing until folks have had a chance to update. That said, we definitely could have done better at documenting this once we did release the update. We’ve since updated the docs for
get_field() to include some notes about this change, and updated the release post to point to those notes.
Regarding how this change improves security – the problem with
get_field() being able to get arbitrary values is that it opens up vulnerabilities with things like AJAX requests or form submissions where
get_field() might be manipulated by the request data.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.