is_writable prevents an error writing to the file if its not writable
This commit is contained in:
@@ -799,7 +799,7 @@ if (!class_exists('modules')) {
|
|||||||
$xml .= " </modules>\n";
|
$xml .= " </modules>\n";
|
||||||
$xml .= "</configuration>";
|
$xml .= "</configuration>";
|
||||||
|
|
||||||
if (file_exists($_SESSION['switch']['conf']['dir'].'/autoload_configs')) {
|
if (is_writable($_SESSION['switch']['conf']['dir'].'/autoload_configs/modules.conf.xml')) {
|
||||||
$fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/modules.conf.xml","w");
|
$fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/modules.conf.xml","w");
|
||||||
fwrite($fout, $xml);
|
fwrite($fout, $xml);
|
||||||
unset($xml);
|
unset($xml);
|
||||||
|
|||||||
Reference in New Issue
Block a user