1
0
Fork 0

Suppress fwrite() notice when not all bytes could be written.

pull/31/head
Stephan Unverwerth 2016-09-29 20:39:42 +02:00
parent 3aad065e41
commit 1fb1722f49
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class ProtocolStreamWriter implements ProtocolWriter
$totalBytesWritten = 0; $totalBytesWritten = 0;
while ($totalBytesWritten < $msgSize) { while ($totalBytesWritten < $msgSize) {
$bytesWritten = fwrite($this->output, substr($data, $totalBytesWritten)); $bytesWritten = @fwrite($this->output, substr($data, $totalBytesWritten));
if ($bytesWritten === false) { if ($bytesWritten === false) {
throw new Error('Could not write message.'); throw new Error('Could not write message.');
} }