mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 12:06:00 +00:00
Merge pull request #18 from benmanu/pulls/save-state-permissions
Add umask on save state to prevent permission denied error
This commit is contained in:
commit
dcee6ba0af
@ -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…
x
Reference in New Issue
Block a user