Skip to content

Commit

Permalink
WIP Remove + From Mode in BaseWriter (#2657)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oleibman authored Mar 12, 2022
1 parent 68158c8 commit 2cdffeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Writer/BaseWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function openFileHandle($filename): void
return;
}

$mode = 'wb+';
$mode = 'wb';
$scheme = parse_url($filename, PHP_URL_SCHEME);
if ($scheme === 's3') {
$mode = 'w';
Expand Down

0 comments on commit 2cdffeb

Please sign in to comment.