mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
Merge branch '2.0' into 3.0
This commit is contained in:
commit
85d55164a6
@ -1120,6 +1120,9 @@ class SFTP extends SSH2
|
||||
$temp = &$this->stat_cache;
|
||||
$max = count($dirs) - 1;
|
||||
foreach ($dirs as $i => $dir) {
|
||||
if (!is_array($temp)) {
|
||||
return false;
|
||||
}
|
||||
if ($i === $max) {
|
||||
unset($temp[$dir]);
|
||||
return true;
|
||||
@ -1146,6 +1149,9 @@ class SFTP extends SSH2
|
||||
|
||||
$temp = &$this->stat_cache;
|
||||
foreach ($dirs as $dir) {
|
||||
if (!is_array($temp)) {
|
||||
return null;
|
||||
}
|
||||
if (!isset($temp[$dir])) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user