Skip to content

Commit 2cdffeb

Browse files
authored
WIP Remove + From Mode in BaseWriter (#2657)
BaseWriter openFileHandle opens its output file with mode `wb+`. We don't appear to attempt any reads on the file after it is opened in write mode, so `wb` should be sufficient. This may have been a factor in the need for PR #2326, and is likely to be responsible for issue #2372.
1 parent 68158c8 commit 2cdffeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Writer/BaseWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function openFileHandle($filename): void
115115
return;
116116
}
117117

118-
$mode = 'wb+';
118+
$mode = 'wb';
119119
$scheme = parse_url($filename, PHP_URL_SCHEME);
120120
if ($scheme === 's3') {
121121
$mode = 'w';

0 commit comments

Comments
 (0)