Home › Forums › Backend Issues (wp-admin) › PHP 8.0 Uncaught TypeError on relationship filter › Reply To: PHP 8.0 Uncaught TypeError on relationship filter
The problem is that ACF is expecting the post_type argument to be an array at this point in the code and you are setting it to a string in your filter.
As a work-a-round use
'post_type' => array('post'),
the filter you are using happens after ACF has formatted the arguments and before it formats the values into json.
I suspect that this needs to be adjusted for PHP8 to see if the post_type argument is a string or not before line 261. But I can’t fix that. Contact the developers here.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.