Making WordPress.org

Changeset 9369


Ignore:
Timestamp:
12/19/2019 08:51:37 AM (5 years ago)
Author:
dd32
Message:

Developer: Avoid a PHP Warning on ?post_type= requests.

See #4647.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php

    r9318 r9369  
    5050        if ( $query->is_main_query() && isset( $_GET['post_type'] ) ) {
    5151            // Get list of valid parsed post types specified in query.
    52             $valid_post_types = array_intersect( $_GET['post_type'], DevHub\get_parsed_post_types() );
     52            $valid_post_types = array_intersect( (array) $_GET['post_type'], DevHub\get_parsed_post_types() );
    5353
    5454            // If no valid post types were specified, then request is a 404.
Note: See TracChangeset for help on using the changeset viewer.