1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-02 09:38:06 +01:00

SFTP: update state cache accordingly when file becomes directory

This commit is contained in:
terrafrost 2018-01-01 13:07:45 -06:00
parent 46b5bd413a
commit 30a11a3951

View File

@ -1202,7 +1202,7 @@ class Net_SFTP extends Net_SSH2
$temp[$dir] = array();
}
if ($i === $max) {
if (is_object($temp[$dir])) {
if (is_object($temp[$dir]) && is_object($value)) {
if (!isset($value->stat) && isset($temp[$dir]->stat)) {
$value->stat = $temp[$dir]->stat;
}