Customize: Do not attempt to count uncountable value.

Props dlh.
Merges [43480] to the 4.9 branch.
Fixes #44104.
Built from https://develop.svn.wordpress.org/branches/4.9@43481


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-07-17 14:40:23 +00:00
parent 29dfd13361
commit dcb9622465
2 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ final class WP_Customize_Nav_Menus {
// Prepend list of posts with nav_menus_created_posts search results on first page. // Prepend list of posts with nav_menus_created_posts search results on first page.
$nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' ); $nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' );
if ( 1 === $args['pagenum'] && $nav_menus_created_posts_setting && count( $nav_menus_created_posts_setting ) > 0 ) { if ( 1 === $args['pagenum'] && $nav_menus_created_posts_setting && count( $nav_menus_created_posts_setting->value() ) > 0 ) {
$stub_post_query = new WP_Query( array_merge( $stub_post_query = new WP_Query( array_merge(
$query, $query,
array( array(

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9.8-alpha-43479'; $wp_version = '4.9.8-alpha-43481';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.