Changes between Version 1 and Version 2 of Ticket #16101, comment 5
- Timestamp:
- 11/10/2020 04:15:04 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16101, comment 5
v1 v2 1 This just bit me in the ass, because I took the term_id from get_terms() and passed it to get_term_link() as $term. get_term_link() assumed that $term was a slug because it failed is_int(), and since there's no term named "237", it returned a WP_Error().1 I just ran into this, because I took the term_id from get_terms() and passed it to get_term_link() as $term. get_term_link() assumed that $term was a slug because it failed is_int(), and since there's no term named "237", it returned a WP_Error(). 2 2 3 3 It seems to me like casting the values to int in get_term*() is the proper fix, even if it requires patching/testing XML-RPC code. If there's a consensus behind that approach, I'll try to find time to write and test a new patch over the next couple weeks.