mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Backup the .env during update
This commit is contained in:
parent
5ee474035a
commit
7e28e0f77e
@ -191,7 +191,9 @@ class AppController extends BaseController
|
|||||||
$config .= "{$key}={$val}\n";
|
$config .= "{$key}={$val}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$fp = fopen(base_path().'/.env', 'w');
|
$filePath = base_path().'/.env';
|
||||||
|
copy($filePath, $filePath . '.backup.' . time());
|
||||||
|
$fp = fopen($filePath, 'w');
|
||||||
fwrite($fp, $config);
|
fwrite($fp, $config);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user