[wp-trac] [WordPress Trac] #57923: Deprecated notice fired by wp_set_object_terms() with PHP 8.1
WordPress Trac
noreply at wordpress.org
Tue Mar 14 20:50:46 UTC 2023
#57923: Deprecated notice fired by wp_set_object_terms() with PHP 8.1
-------------------------------+---------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.3
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: php81 needs-patch | Focuses:
-------------------------------+---------------------
Comment (by costdev):
> replacing any empty $terms by array()
This makes sense. The docs for the `$terms` parameter state:
Passing an empty value will remove all related terms.
A thought: While this is documented as `string|int|array`, we might
consider adding `null` to this list so that it's documented and our future
selves know to protect BC for `null`. Not sure about that, but curious
what others think.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57923#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list