mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Upgrade/Install: Return a WP_Error
from copy_dir()
and _copy_dir()
if the directory listing failed.
Props afragen, dd32. Fixes #52342. Built from https://develop.svn.wordpress.org/trunk@50149 git-svn-id: http://core.svn.wordpress.org/trunk@49828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aab7206ff8
commit
90ca61ba07
@ -1776,6 +1776,10 @@ 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 ) );
|
||||
}
|
||||
|
||||
$from = trailingslashit( $from );
|
||||
$to = trailingslashit( $to );
|
||||
|
||||
|
@ -1352,6 +1352,10 @@ 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 ) );
|
||||
}
|
||||
|
||||
$from = trailingslashit( $from );
|
||||
$to = trailingslashit( $to );
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.7-alpha-50148';
|
||||
$wp_version = '5.7-alpha-50149';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user