mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-31 12:00:39 -07:00
Binary-unsafe 'fopen(...)' usage
This commit is contained in:
parent
e9585e0789
commit
b9686af593
4 changed files with 5 additions and 5 deletions
|
@ -220,7 +220,7 @@ if ($check_upload) {
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!($fp = @fopen($upload_dir . '/0_000000.000', 'w'))) {
|
||||
if (!($fp = @fopen($upload_dir . '/0_000000.000', 'wb'))) {
|
||||
$error = true;
|
||||
$error_msg = sprintf($lang['DIRECTORY_NOT_WRITEABLE'], $attach_config['upload_dir']) . '<br />';
|
||||
} else {
|
||||
|
@ -375,7 +375,7 @@ if ($check_image_cat) {
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!($fp = @fopen($upload_dir . '/0_000000.000', 'w'))) {
|
||||
if (!($fp = @fopen($upload_dir . '/0_000000.000', 'wb'))) {
|
||||
$error = true;
|
||||
$error_msg = sprintf($lang['DIRECTORY_NOT_WRITEABLE'], $upload_dir) . '<br />';
|
||||
} else {
|
||||
|
|
|
@ -130,7 +130,7 @@ class emailer
|
|||
}
|
||||
}
|
||||
|
||||
if (!($fd = @fopen($tpl_file, 'r'))) {
|
||||
if (!($fd = @fopen($tpl_file, 'rb'))) {
|
||||
bb_die('Failed opening template file :: ' . $tpl_file);
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ function create_atom($file_path, $mode, $id, $title, $topics)
|
|||
}
|
||||
$atom .= "</feed>";
|
||||
@unlink($file_path);
|
||||
$fp = fopen($file_path, "w");
|
||||
$fp = fopen($file_path, 'wb');
|
||||
fwrite($fp, $atom);
|
||||
fclose($fp);
|
||||
return true;
|
||||
|
|
|
@ -286,7 +286,7 @@ function tracker_register($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVED
|
|||
|
||||
if ($bb_cfg['bt_disable_dht']) {
|
||||
$tor['info']['private'] = (int)1;
|
||||
$fp = fopen($filename, 'w+');
|
||||
$fp = fopen($filename, 'wb+');
|
||||
fwrite($fp, bencode($tor));
|
||||
fclose($fp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue