Filesystem: in WP_Filesystem_FTPext::parselisting(), check for the existence of $b['islink'] before using it.

Props jesin.
Fixes #27975.


git-svn-id: https://develop.svn.wordpress.org/trunk@35476 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-10-31 20:16:32 +00:00
parent 957a800bd3
commit df134d1763

View File

@@ -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;
}