WordPress.org

Make WordPress Core

Changeset 43480


Ignore:
Timestamp:
07/17/2018 02:37:21 PM (3 years ago)
Author:
azaozz
Message:

Customize: Do not attempt to count uncountable value.

Props dlh.
Fixes #44104.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r42875 r43480  
    325325        // Prepend list of posts with nav_menus_created_posts search results on first page.
    326326        $nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' );
    327         if ( 1 === $args['pagenum'] && $nav_menus_created_posts_setting && count( $nav_menus_created_posts_setting ) > 0 ) {
     327        if ( 1 === $args['pagenum'] && $nav_menus_created_posts_setting && count( $nav_menus_created_posts_setting->value() ) > 0 ) {
    328328            $stub_post_query = new WP_Query(
    329329                array_merge(
  • trunk/tests/phpunit/tests/customize/nav-menus.php

    r42611 r43480  
    298298    function test_search_available_items_query() {
    299299        $menus = new WP_Customize_Nav_Menus( $this->wp_customize );
     300        do_action( 'customize_register', $this->wp_customize );
    300301
    301302        // Create posts.
Note: See TracChangeset for help on using the changeset viewer.