From 2d6e474c85d77f349234e950dae9488a84afdb2e Mon Sep 17 00:00:00 2001 From: whyisjake Date: Tue, 8 Jun 2021 22:08:09 +0000 Subject: [PATCH] Media: Ensure that post_id variable is initiated ahead of usage. This prevents warnings when using custom bulk actions in the media library. Props gitlost, achbed, Boniu91, wpgurudev, hellofromTonya. Fixes #39589. Built from https://develop.svn.wordpress.org/trunk@51111 git-svn-id: http://core.svn.wordpress.org/trunk@50720 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upload.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/upload.php b/wp-admin/upload.php index b690d02506..d307453dc1 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -119,6 +119,7 @@ $doaction = $wp_list_table->current_action(); if ( $doaction ) { check_admin_referer( 'bulk-media' ); + $post_ids = array(); if ( 'delete_all' === $doaction ) { $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='attachment' AND post_status = 'trash'" ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 990cb88104..6ce3828c01 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-51110'; +$wp_version = '5.8-alpha-51111'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.