mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-28 07:09:01 +00:00
Update SSH2.php
This commit is contained in:
parent
d76cb81244
commit
6a3c531223
@ -2532,7 +2532,7 @@ class SSH2
|
|||||||
* @psalm-return ($callback is callable ? bool : string|bool)
|
* @psalm-return ($callback is callable ? bool : string|bool)
|
||||||
* @throws \RuntimeException on connection error
|
* @throws \RuntimeException on connection error
|
||||||
*/
|
*/
|
||||||
public function exec(string $command, callable $callback = null)
|
public function exec(string $command, $callback = null)
|
||||||
{
|
{
|
||||||
$this->curTimeout = $this->timeout;
|
$this->curTimeout = $this->timeout;
|
||||||
$this->is_timeout = false;
|
$this->is_timeout = false;
|
||||||
@ -2623,7 +2623,7 @@ class SSH2
|
|||||||
|
|
||||||
$this->channel_status[self::CHANNEL_EXEC] = MessageType::CHANNEL_DATA;
|
$this->channel_status[self::CHANNEL_EXEC] = MessageType::CHANNEL_DATA;
|
||||||
|
|
||||||
if ($callback === null || $this->in_request_pty_exec) {
|
if ($callback === false || $this->in_request_pty_exec) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user