Opened 10 years ago
Closed 10 years ago
#37389 closed defect (bug) (fixed)
Incorrect WP_Error usage in WP_Tax_Query
| Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.6 |
| Component: | Taxonomy | Version: | 3.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
In WP_Tax_Query::clean_query() and WP_Tax_Query::transform_query(), strings are used as error codes:
$query = new WP_Error( 'Invalid taxonomy' ); ... $query = new WP_Error( 'Inexistent terms' );
Correct usage would be:
$query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); ... $query = new WP_Error( 'inexistent_terms', __( 'Inexistent terms.' ) );
Introduced in [17686].
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 38079: