mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
SFTP: update directory deletion check (#1059)
This commit is contained in:
parent
7cb66ea56e
commit
a2d9622bf9
@ -2237,7 +2237,12 @@ class Net_SFTP extends Net_SSH2
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($path)) {
|
if (is_object($path)) {
|
||||||
|
// It's an object. Cast it as string before we check anything else.
|
||||||
|
$path = (string) $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_string($path) || $path == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user