Merge pull request #1909 from browner12/AB-fputs-failure-message

(3.0 branch) update exception message
This commit is contained in:
terrafrost 2023-04-21 15:33:04 -05:00 committed by GitHub
commit 21db83aeb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -4266,7 +4266,8 @@ class SSH2
if (strlen($packet) != $sent) {
$this->bitmap = 0;
throw new \RuntimeException("Only $sent of " . strlen($packet) . " bytes were sent");
$message = $sent === false ? ('Unable to write ' . strlen($packet) . ' bytes') : ("Only $sent of " . strlen($packet) . " bytes were sent");
throw new \RuntimeException($message);
}
}