Fix #32148 TransportException was not thrown

This commit is contained in:
Beno!t POLASZEK 2019-09-03 22:05:27 +02:00
parent f48ebfa402
commit 6c90e08368

View File

@ -35,7 +35,7 @@ abstract class AbstractStream
$bytesToWrite = \strlen($bytes);
$totalBytesWritten = 0;
while ($totalBytesWritten < $bytesToWrite) {
$bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
$bytesWritten = @fwrite($this->in, substr($bytes, $totalBytesWritten));
if (false === $bytesWritten || 0 === $bytesWritten) {
throw new TransportException('Unable to write bytes on the wire.');
}