Forráskód Böngészése

Fix fclose() incorrect variable

fclose() is using incorrect variable $new_conf should be $fp to properly close fopen
Joe Mattos 9 éve
szülő
commit
54125174cb
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      web/edit/server/bind9/index.php

+ 2 - 2
web/edit/server/bind9/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_options']));
-        fclose($new_conf);
+        fclose($fp);
         exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9-opt ".$v_restart, $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);
@@ -43,7 +43,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." bind9 ".$v_restart, $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);