mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
Config - fix file open mode in overwrite(), to prevent trying to open a lock on a boolean.
This is a bit of an edge case, but when someone removes /conf/config.xml and backups exists, we can not construct a config object anymore.
This commit is contained in:
parent
7eb9e3f541
commit
07985a3db3
@ -626,7 +626,7 @@ class Config extends Singleton
|
||||
*/
|
||||
private function overwrite($filename)
|
||||
{
|
||||
$fhandle = fopen($this->config_file, "r+");
|
||||
$fhandle = fopen($this->config_file, "a+e");
|
||||
if (flock($fhandle, LOCK_EX)) {
|
||||
fseek($fhandle, 0);
|
||||
chmod($this->config_file, 0640);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user