diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index b3eb0b32cc..275d07caca 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -78,12 +78,16 @@ class WP_Media_List_Table extends WP_List_Table { */ $not_in = array(); - foreach ( _get_cron_array() as $cron ) { - if ( isset( $cron['upgrader_scheduled_cleanup'] ) ) { - $details = reset( $cron['upgrader_scheduled_cleanup'] ); + $crons = _get_cron_array(); - if ( ! empty( $details['args'][0] ) ) { - $not_in[] = (int) $details['args'][0]; + if ( is_array( $crons ) ) { + foreach ( $crons as $cron ) { + if ( isset( $cron['upgrader_scheduled_cleanup'] ) ) { + $details = reset( $cron['upgrader_scheduled_cleanup'] ); + + if ( ! empty( $details['args'][0] ) ) { + $not_in[] = (int) $details['args'][0]; + } } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2c931ecfc2..71bf87b302 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51637'; +$wp_version = '5.9-alpha-51638'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.