Skip to content

Commit 9920624

Browse files
committed
Suppress warning if stream is closed just before fwrite()
1 parent e074154 commit 9920624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stream/StreamWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function write($auto_close=true)
5555
$this->buffer .= stream_get_contents($this->stream, $this->buffer_size);
5656
}
5757

58-
$bytes_written = fwrite($this->dest_stream, $this->buffer);
58+
$bytes_written = @fwrite($this->dest_stream, $this->buffer);
5959

6060
if ($bytes_written === false) {
6161
return 0;

0 commit comments

Comments
 (0)