We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e053a20 commit 6caf83fCopy full SHA for 6caf83f
src/Stream/StringWriter.php
@@ -45,7 +45,12 @@ public function write($auto_close=true)
45
return false;
46
} else {
47
$chunk = substr($this->data, $this->position, $this->buffer_size);
48
- $bytes_written = fwrite($this->dest_stream, $chunk);
+ $bytes_written = @fwrite($this->dest_stream, $chunk);
49
+
50
+ if ($bytes_written === false) {
51
+ $bytes_written = 0;
52
+ }
53
54
$this->position += $bytes_written;
55
return $bytes_written;
56
}
0 commit comments