Просмотр исходного кода

Fix fclose() incorrect variable

fclose() is using incorrect variable $new_conf should be $fp to properly close fopen
Joe Mattos 9 лет назад
Родитель
Сommit
71c5e91986
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      web/edit/server/fail2ban/index.php

+ 1 - 1
web/edit/server/fail2ban/index.php

@@ -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." fail2ban ".$v_restart, $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);