| 1 | Index: wp-admin/includes/update-core.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/includes/update-core.php (revision 17577) |
|---|
| 4 | +++ wp-admin/includes/update-core.php (working copy) |
|---|
| 5 | @@ -367,7 +367,7 @@ |
|---|
| 6 | |
|---|
| 7 | // Custom Content Directory needs updating now. |
|---|
| 8 | // Copy Languages |
|---|
| 9 | - if ( !is_wp_error($result) && $wp_filesystem->is_dir($from . $distro . 'wp-content/languages') ) { |
|---|
| 10 | + if ( !is_wp_error($result) && is_callable( array($wp_filesystem, 'wp_lang_dir') ) && $wp_filesystem->is_dir($from . $distro . 'wp-content/languages') ) { |
|---|
| 11 | if ( !@is_dir(WP_LANG_DIR) && 0 === strpos(WP_LANG_DIR, ABSPATH) ) { // Check the language directory exists first |
|---|
| 12 | $wp_filesystem->mkdir($to . str_replace(WP_LANG_DIR, ABSPATH, ''), FS_CHMOD_DIR); // If it's within the ABSPATH we can handle it here, otherwise they're out of luck. |
|---|
| 13 | clearstatcache(); // for FTP, Need to clear the stat cache |
|---|