Making WordPress.org


Ignore:
Timestamp:
09/30/2016 10:19:35 AM (10 years ago)
Author:
ocean90
Message:

Plugin Directory: In Jetpack_Search::filter__the_posts() check if search results exists.

Avoids a PHP warning for bad requests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php

    r4173 r4174  
    207207                        return $posts;
    208208
    209                 if ( ! is_array( $this->search_result ) )
     209                if ( ! is_array( $this->search_result ) || ! isset( $this->search_result['results'] ) ) {
    210210                        return $posts;
     211                }
    211212
    212213                // This class handles the heavy lifting of transparently switching blogs and inflating posts
Note: See TracChangeset for help on using the changeset viewer.