1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-11 16:49:42 +01:00

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

View File

@ -4266,7 +4266,8 @@ class SSH2
if (strlen($packet) != $sent) { if (strlen($packet) != $sent) {
$this->bitmap = 0; $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);
} }
} }