Fix #32148 TransportException was not thrown
This commit is contained in:
parent
f48ebfa402
commit
6c90e08368
@ -35,7 +35,7 @@ abstract class AbstractStream
|
|||||||
$bytesToWrite = \strlen($bytes);
|
$bytesToWrite = \strlen($bytes);
|
||||||
$totalBytesWritten = 0;
|
$totalBytesWritten = 0;
|
||||||
while ($totalBytesWritten < $bytesToWrite) {
|
while ($totalBytesWritten < $bytesToWrite) {
|
||||||
$bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
|
$bytesWritten = @fwrite($this->in, substr($bytes, $totalBytesWritten));
|
||||||
if (false === $bytesWritten || 0 === $bytesWritten) {
|
if (false === $bytesWritten || 0 === $bytesWritten) {
|
||||||
throw new TransportException('Unable to write bytes on the wire.');
|
throw new TransportException('Unable to write bytes on the wire.');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user