Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d23b74e commit 0d7d19cCopy full SHA for 0d7d19c
src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php
@@ -103,7 +103,10 @@ public function save()
103
104
try {
105
if ($data) {
106
- file_put_contents($this->getFilePath(), serialize($data));
+ $path = $this->getFilePath();
107
+ $tmp = $path.bin2hex(random_bytes(6));
108
+ file_put_contents($tmp, serialize($data));
109
+ rename($tmp, $path);
110
} else {
111
$this->destroy();
112
}
0 commit comments