diff --git a/src/Cookie/FileCookieJar.php b/src/Cookie/FileCookieJar.php index e43185172..fbc770f43 100644 --- a/src/Cookie/FileCookieJar.php +++ b/src/Cookie/FileCookieJar.php @@ -50,7 +50,7 @@ public function save($filename) } } - if (false === file_put_contents($filename, json_encode($json))) { + if (false === file_put_contents($filename, json_encode($json), LOCK_EX)) { // @codeCoverageIgnoreStart throw new \RuntimeException("Unable to save file {$filename}"); // @codeCoverageIgnoreEnd