Skip to content

Commit 5412517

Browse files
authored
Fix fclose() incorrect variable
fclose() is using incorrect variable $new_conf should be $fp to properly close fopen
1 parent 25b0978 commit 5412517

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/edit/server/bind9/index.php

Lines changed: 2 additions & 2 deletions
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_options']));
33-
fclose($new_conf);
33+
fclose($fp);
3434
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9-opt ".$v_restart, $output, $return_var);
3535
check_return_code($return_var,$output);
3636
unset($output);
@@ -43,7 +43,7 @@
4343
$new_conf = $mktemp_output[0];
4444
$fp = fopen($new_conf, 'w');
4545
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
46-
fclose($new_conf);
46+
fclose($fp);
4747
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9 ".$v_restart, $output, $return_var);
4848
check_return_code($return_var,$output);
4949
unset($output);

0 commit comments

Comments
 (0)