diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php index c869ec0dc9..7f5f052cbb 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -520,8 +520,9 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { } // Replace symlinks formatted as "source -> target" with just the source name - if ( $b['islink'] ) + if ( isset( $b['islink'] ) && $b['islink'] ) { $b['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $b['name'] ); + } return $b; }