Skip to content

Commit fbb4601

Browse files
committed
Fix #32148 TransportException was not thrown
1 parent e1959fb commit fbb4601

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

AbstractStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function write(string $bytes): void
3535
$bytesToWrite = \strlen($bytes);
3636
$totalBytesWritten = 0;
3737
while ($totalBytesWritten < $bytesToWrite) {
38-
$bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
38+
$bytesWritten = @fwrite($this->in, substr($bytes, $totalBytesWritten));
3939
if (false === $bytesWritten || 0 === $bytesWritten) {
4040
throw new TransportException('Unable to write bytes on the wire.');
4141
}

Smtp/Stream/AbstractStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function write(string $bytes): void
3535
$bytesToWrite = \strlen($bytes);
3636
$totalBytesWritten = 0;
3737
while ($totalBytesWritten < $bytesToWrite) {
38-
$bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
38+
$bytesWritten = @fwrite($this->in, substr($bytes, $totalBytesWritten));
3939
if (false === $bytesWritten || 0 === $bytesWritten) {
4040
throw new TransportException('Unable to write bytes on the wire.');
4141
}

Stream/AbstractStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function write(string $bytes): void
3535
$bytesToWrite = \strlen($bytes);
3636
$totalBytesWritten = 0;
3737
while ($totalBytesWritten < $bytesToWrite) {
38-
$bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
38+
$bytesWritten = @fwrite($this->in, substr($bytes, $totalBytesWritten));
3939
if (false === $bytesWritten || 0 === $bytesWritten) {
4040
throw new TransportException('Unable to write bytes on the wire.');
4141
}

Transport/Smtp/Stream/AbstractStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function write(string $bytes): void
3535
$bytesToWrite = \strlen($bytes);
3636
$totalBytesWritten = 0;
3737
while ($totalBytesWritten < $bytesToWrite) {
38-
$bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
38+
$bytesWritten = @fwrite($this->in, substr($bytes, $totalBytesWritten));
3939
if (false === $bytesWritten || 0 === $bytesWritten) {
4040
throw new TransportException('Unable to write bytes on the wire.');
4141
}

0 commit comments

Comments
 (0)