is_writable prevents an error writing to the file if its not writable
This commit is contained in:
parent
5e69a3deda
commit
f7b1ad53cd
|
|
@ -799,7 +799,7 @@ if (!class_exists('modules')) {
|
|||
$xml .= " </modules>\n";
|
||||
$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");
|
||||
fwrite($fout, $xml);
|
||||
unset($xml);
|
||||
|
|
|
|||
Loading…
Reference in New Issue