Skip to content

Commit 71c5e91

Browse files
authored
Fix fclose() incorrect variable
fclose() is using incorrect variable $new_conf should be $fp to properly close fopen
1 parent 2b56370 commit 71c5e91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/edit/server/fail2ban/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
$new_conf = $mktemp_output[0];
3131
$fp = fopen($new_conf, 'w');
3232
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
33-
fclose($new_conf);
33+
fclose($fp);
3434
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." fail2ban ".$v_restart, $output, $return_var);
3535
check_return_code($return_var,$output);
3636
unset($output);

0 commit comments

Comments
 (0)