diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index c05345e6e2..1ba480f2f1 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -3003,7 +3003,7 @@ function wp_ajax_query_attachments() { $total_posts = $count_query->found_posts; } - $posts_per_page = (int) $attachments_query->query['posts_per_page']; + $posts_per_page = (int) $attachments_query->get( 'posts_per_page' ); $max_pages = $posts_per_page ? ceil( $total_posts / $posts_per_page ) : 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index 008dac517a..90b7b8f955 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8.2-alpha-51981'; +$wp_version = '5.8.2-alpha-51983'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.