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 .= " </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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue