Skip to content

Commit

Permalink
fix "fopen_flags"
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 16, 2023
1 parent 0bd227e commit ef1d8a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
'heredoc_to_nowdoc' => false,
'no_useless_else' => false,
'phpdoc_no_empty_return' => false,
'psr_autoloading' => false,
'single_line_comment_style' => false,

// TODO
Expand Down Expand Up @@ -122,7 +123,6 @@
'visibility_required' => false,

// TODO - risky
'fopen_flags' => false,
'function_to_constant' => false,
'no_unset_on_property' => false,
'php_unit_construct' => false,
Expand All @@ -131,7 +131,6 @@
'php_unit_set_up_tear_down_visibility' => false,
'php_unit_strict' => false,
'php_unit_test_case_static_method_calls' => false,
'psr_autoloading' => false,
'random_api_migration' => false,
'self_accessor' => false,
'static_lambda' => false,
Expand Down
2 changes: 1 addition & 1 deletion program/include/rcmail_attachment_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function body($size = null, $fp = null)
$result = fwrite($fp, $size ? substr($attachment['data'], 0, $size) : $attachment['data']) !== false;
}
else if ($attachment['path']) {
if ($fh = fopen($attachment['path'], 'rb')) {
if ($fh = fopen($attachment['path'], 'r')) {
$result = stream_copy_to_stream($fh, $fp, $size ?: -1);
}
}
Expand Down

0 comments on commit ef1d8a9

Please sign in to comment.