mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-17 02:35:10 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
ceaffa8fa9
@ -1198,6 +1198,9 @@ class SFTP extends SSH2
|
|||||||
$temp = &$this->stat_cache;
|
$temp = &$this->stat_cache;
|
||||||
$max = count($dirs) - 1;
|
$max = count($dirs) - 1;
|
||||||
foreach ($dirs as $i => $dir) {
|
foreach ($dirs as $i => $dir) {
|
||||||
|
if (!is_array($temp)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ($i === $max) {
|
if ($i === $max) {
|
||||||
unset($temp[$dir]);
|
unset($temp[$dir]);
|
||||||
return true;
|
return true;
|
||||||
@ -1224,6 +1227,9 @@ class SFTP extends SSH2
|
|||||||
|
|
||||||
$temp = &$this->stat_cache;
|
$temp = &$this->stat_cache;
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
|
if (!is_array($temp)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (!isset($temp[$dir])) {
|
if (!isset($temp[$dir])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user