Make WordPress Core

Timestamp:
03/14/2016 01:52:14 PM (6 years ago)
Author:
boonebgorges
Message:

Improve error handling in get_categories().

When passed an invalid 'taxonomy', get_terms() will return a WP_Error
object. This object should not be blindly cast to an array. Instead, an empty
array should be returned, to indicate that no matching terms have been found.

Props virgodesign, sebastian.pisula.
Fixes #36227.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.