You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Readme states that $raw_post->taxonomies shoud be An array of taxonomy objects.
In set_taxonomies function the $raw_post->taxonomies is casted as array. Note that it's the array of objects that are casted instead of the objects.
In validate_taxonomies function there is first check ! is_array( $taxonomies which it now always true. The error message "Error in the taxonomies. Taxonomies must be passed in an associative array." implies that each object should be checked but instead of object it should be an associative array.
After that there is foearch loop with check if $term['taxonomy'] is a registered taxonomy. Here the code fails if you have set the $raw_post->taxonomies as an array of taxonomy objects. Array of associative arrays works. That's not optimal though since the WP_Term need to be casted to array before it can be used.
So should $raw_post->taxonomies contain objects or associative arrays?
The text was updated successfully, but these errors were encountered:
Readme states that
$raw_post->taxonomies
shoud beAn array of taxonomy objects
.In set_taxonomies function the
$raw_post->taxonomies
is casted as array. Note that it's the array of objects that are casted instead of the objects.In validate_taxonomies function there is first check
! is_array( $taxonomies
which it now always true. The error message"Error in the taxonomies. Taxonomies must be passed in an associative array."
implies that each object should be checked but instead of object it should be an associative array.After that there is foearch loop with check if
$term['taxonomy']
is a registered taxonomy. Here the code fails if you have set the$raw_post->taxonomies
asan array of taxonomy objects
. Array of associative arrays works. That's not optimal though since the WP_Term need to be casted to array before it can be used.So should
$raw_post->taxonomies
contain objects or associative arrays?The text was updated successfully, but these errors were encountered: