Skip to content

Commit

Permalink
Merge pull request #49 from Valdocco/29_sftp_scan_directory_recursive…
Browse files Browse the repository at this point in the history
…_fix

29 scan directory recursive fix
  • Loading branch information
Herzult committed Oct 2, 2015
2 parents d569d15 + 1eb2c07 commit 13eec7e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Ssh/Sftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,10 @@ private function scanDirectory($directory, $recursive)

if ($recursive) {
$children = $this->scanDirectory($filename, $recursive);
$files = array_merge($files, $children[0]);
$directories = array_merge($directories, $children[1]);
if (is_array($children)) {
$files = array_merge($files, $children[0]);
$directories = array_merge($directories, $children[1]);
}
}
}
}
Expand Down

0 comments on commit 13eec7e

Please sign in to comment.