Skip to content

Commit

Permalink
Merge pull request #339 from tartangear/patch-1
Browse files Browse the repository at this point in the history
Check for type value in PhpseclibSftp Adapter
  • Loading branch information
Albin Kerouanton authored and Albin Kerouanton committed May 26, 2015
2 parents f173415 + f2e4947 commit 9d52413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gaufrette/Adapter/PhpseclibSftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ protected function fetchKeys($directory = '', $onlyKeys = true)
}

$path = ltrim($directory . '/' . $filename, '/');
if ($stat['type'] === NET_SFTP_TYPE_DIRECTORY) {
if (isset($stat['type']) && $stat['type'] === NET_SFTP_TYPE_DIRECTORY) {
$keys['dirs'][] = $path;
} else {
$keys['keys'][] = $path;
Expand Down

0 comments on commit 9d52413

Please sign in to comment.