mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Filesystem API: Return correct error data from copy_dir()
if the directory listing failed.
The `::dirlist()` method is run on the `$from` directory, so `basename( $from )` is the correct thing to pass to the `WP_Error` object. Follow-up to [50149]. Props afragen, costdev, pravinparmar2404. Fixes #57907. Built from https://develop.svn.wordpress.org/trunk@55538 git-svn-id: http://core.svn.wordpress.org/trunk@55050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fe32dc4241
commit
8d7d99289d
@ -1904,7 +1904,7 @@ function copy_dir( $from, $to, $skip_list = array() ) {
|
||||
$dirlist = $wp_filesystem->dirlist( $from );
|
||||
|
||||
if ( false === $dirlist ) {
|
||||
return new WP_Error( 'dirlist_failed_copy_dir', __( 'Directory listing failed.' ), basename( $to ) );
|
||||
return new WP_Error( 'dirlist_failed_copy_dir', __( 'Directory listing failed.' ), basename( $from ) );
|
||||
}
|
||||
|
||||
$from = trailingslashit( $from );
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-alpha-55537';
|
||||
$wp_version = '6.3-alpha-55538';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user