Update SSH2.php

This commit is contained in:
Christian R 2022-09-15 14:24:31 +03:00 committed by GitHub
parent d76cb81244
commit 6a3c531223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2532,7 +2532,7 @@ class SSH2
* @psalm-return ($callback is callable ? bool : string|bool)
* @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->is_timeout = false;
@ -2623,7 +2623,7 @@ class SSH2
$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;
}