Skip to content

Commit

Permalink
Tried to fix bug #29. Need to validate with positive error case.
Browse files Browse the repository at this point in the history
  • Loading branch information
h4cc committed Aug 11, 2014
1 parent 1ed552d commit 05b3dea
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 @@ -287,8 +287,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(false !== $children) {
$files = array_merge($files, $children[0]);
$directories = array_merge($directories, $children[1]);
}
}
}
}
Expand Down

0 comments on commit 05b3dea

Please sign in to comment.