浏览代码

Added check

will now throw if the config.lua could not be opened for writing
Matthew Vale 9 年之前
父节点
当前提交
6b0ac3e5b0
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      core/databases/app_defaults.php

+ 3 - 0
core/databases/app_defaults.php

@@ -126,6 +126,9 @@ if ($domains_processed == 1) {
 				$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
 			}
 			$fout = fopen($config,"w");
+			if(!$fout){
+				throw new Exception("Failed to open '$config' for writing");
+			}
 			$tmp = "\n";
 			$tmp .= "--set the variables\n";
 			if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {