Privacy: Do not attempt to cleanup personal data export files when the directory does not exist.
Checking for the presence of the directory and returning early prevents PHP warnings when attempting to list files in a non-existent directory. Props arena, garrett-eclipse. Fixes #45136. Built from https://develop.svn.wordpress.org/trunk@44910 git-svn-id: http://core.svn.wordpress.org/trunk@44741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ac3033d77
commit
ecfb6fd700
|
@ -6712,9 +6712,12 @@ function wp_schedule_delete_old_privacy_export_files() {
|
|||
* @since 4.9.6
|
||||
*/
|
||||
function wp_privacy_delete_old_export_files() {
|
||||
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
||||
$exports_dir = wp_privacy_exports_dir();
|
||||
if ( ! is_dir( $exports_dir ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$exports_dir = wp_privacy_exports_dir();
|
||||
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
||||
$export_files = list_files( $exports_dir, 100, array( 'index.html' ) );
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-alpha-44909';
|
||||
$wp_version = '5.2-alpha-44910';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue