mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
Add umask when saving state to the file system to prevent permission denied error
This commit is contained in:
parent
cedb6e26ce
commit
a50bab5445
@ -299,7 +299,9 @@ class TestSessionEnvironment extends Object {
|
||||
} else {
|
||||
$content = json_encode($state);
|
||||
}
|
||||
$old = umask(0);
|
||||
file_put_contents($this->getFilePath(), $content, LOCK_EX);
|
||||
umask($old);
|
||||
}
|
||||
|
||||
public function loadFromFile() {
|
||||
|
Loading…
Reference in New Issue
Block a user