diff --git a/app/modules/resources/classes/modules.php b/app/modules/resources/classes/modules.php index 34398736d6..280846de14 100644 --- a/app/modules/resources/classes/modules.php +++ b/app/modules/resources/classes/modules.php @@ -809,10 +809,12 @@ if (!class_exists('modules')) { $xml .= " \n"; $xml .= ""; - $fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/modules.conf.xml","w"); - fwrite($fout, $xml); - unset($xml); - fclose($fout); + if (file_exists($_SESSION['switch']['conf']['dir'].'/autoload_configs')) { + $fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/modules.conf.xml","w"); + fwrite($fout, $xml); + unset($xml); + fclose($fout); + } //apply settings $_SESSION["reload_xml"] = true;