Hi, after upgrading to PHP 8.1 my the ACF relationship field started failing. The problem seems to be inside the library itself, any advice how to fix? Thanks.
FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-relationship.php:261
$args[‘post_type’] should never not be an array at this point in the code. The only reason that it could be is that there is an acf/fields/relationship/query filter setting the query arg value to a string rather than an array.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users