mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +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();
|
$file_contents = $this->render();
|
||||||
|
|
||||||
//write the file
|
//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.");
|
$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);
|
fwrite($fh, $file_contents);
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
|
|||||||
Reference in New Issue
Block a user