mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-02 10:03:49 +00:00
Check for directory before trying to create (#3627)
This commit is contained in:
@@ -1419,7 +1419,9 @@ include "root.php";
|
||||
$file_contents = $this->render();
|
||||
|
||||
//write the file
|
||||
mkdir($directory,0777,true);
|
||||
if(!is_dir($directory)) {
|
||||
mkdir($directory,0777,true);
|
||||
}
|
||||
$fh = fopen($dest_path,"w") or die("Unable to write to $directory for provisioning. Make sure the path exists and permissons are set correctly.");
|
||||
fwrite($fh, $file_contents);
|
||||
fclose($fh);
|
||||
|
||||
Reference in New Issue
Block a user