Themes: Check if the browse view is set in `wp_ajax_query_themes()` to avoid a PHP notice when searching for new themes.

Introduced in [35527].

See #34206.

git-svn-id: https://develop.svn.wordpress.org/trunk@35646 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-11-16 19:46:37 +00:00
parent 56625d9e13
commit 32d4eec670
1 changed files with 1 additions and 1 deletions

View File

@ -2821,7 +2821,7 @@ function wp_ajax_query_themes() {
'fields' => $theme_field_defaults
) );
if ( 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) {
if ( isset( $args['browse'] ) && 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) {
$user = get_user_option( 'wporg_favorites' );
if ( $user ) {
$args['user'] = $user;