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