8000 Use atomic file_put_contents in MockFileSessionStorage · mpdude/symfony@cb61d21 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb61d21

Browse files
authored
Use atomic file_put_contents in MockFileSessionStorage
1 parent 6564e00 commit cb61d21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function save()
104104

105105
try {
106106
if ($data) {
107-
file_put_contents($this->getFilePath(), serialize($data));
107+
file_put_contents($this->getFilePath(), serialize($data), LOCK_EX);
108108
} else {
109109
$this->destroy();
110110
}

0 commit comments

Comments
 (0)
0