Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2018-10-11 23:42:28 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-10-11 23:42:28 +0300
commitcca8b3c72d8a9ea98723cdad3b9714b085e04086 (patch)
treef0853140721328afbd68e34051d3767e3d235b47 /core/Config.php
parentcdbf944146cea42a4725eb9fa814c51c7b32b17b (diff)
Acquire an exclusive lock when writing config file (#13583)
Avoids a config file end up empty under circumstances
Diffstat (limited to 'core/Config.php')
-rw-r--r--core/Config.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Config.php b/core/Config.php
index e47cd2f150..c70d75f1e0 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -387,7 +387,7 @@ class Config
// simulate whether it would be successful
$success = is_writable($localPath);
} else {
- $success = @file_put_contents($localPath, $output);
+ $success = @file_put_contents($localPath, $output, LOCK_EX);
}
if ($success === false) {