Added check
will now throw if the config.lua could not be opened for writing
This commit is contained in:
@@ -126,6 +126,9 @@ if ($domains_processed == 1) {
|
|||||||
$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
|
$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
|
||||||
}
|
}
|
||||||
$fout = fopen($config,"w");
|
$fout = fopen($config,"w");
|
||||||
|
if(!$fout){
|
||||||
|
throw new Exception("Failed to open '$config' for writing");
|
||||||
|
}
|
||||||
$tmp = "\n";
|
$tmp = "\n";
|
||||||
$tmp .= "--set the variables\n";
|
$tmp .= "--set the variables\n";
|
||||||
if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user