1
0
mirror of https://github.com/myvesta/vesta.git synced 2025-03-12 04:35:23 -07:00

Fix fclose() incorrect variable

fclose() is using incorrect variable $new_conf should be $fp to properly close fopen
This commit is contained in:
Joe Mattos 2017-02-27 00:57:52 -05:00 committed by GitHub
parent 6bc522c4a7
commit a51348686d

@ -30,7 +30,7 @@ if (!empty($_POST['save'])) {
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
fclose($fp);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." nginx ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);