Make WordPress Core


Ignore:
Timestamp:
03/18/2026 09:02:09 PM (8 months ago)
Author:
SergeyBiryukov
Message:

Query: Check that taxonomy query var is a string in WP_Query::parse_tax_query().

This prevents a fatal error from urldecode() in wp_basename() if an array is passed instead.

Follow-up to [15732], [15824], [15825], [15923], [16155], [50565], [60927].

Props patricedefago, alexodiy, SergeyBiryukov.
Fixes #64870.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r61878 r62047  
    11901190                                );
    11911191
    1192                                 if ( ! empty( $t->rewrite['hierarchical'] ) ) {
     1192                                if ( is_string( $query_vars[ $t->query_var ] ) && ! empty( $t->rewrite['hierarchical'] ) ) {
    11931193                                        $query_vars[ $t->query_var ] = wp_basename( $query_vars[ $t->query_var ] );
    11941194                                }
Note: See TracChangeset for help on using the changeset viewer.