mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 12:06:00 +00:00
Merge branch '2' into 3
This commit is contained in:
commit
521e84a93b
@ -528,7 +528,10 @@ class TestSessionEnvironment
|
||||
public function getState()
|
||||
{
|
||||
$path = Director::getAbsFile($this->getFilePath());
|
||||
return (file_exists($path ?? '')) ? json_decode(file_get_contents($path)) : new stdClass;
|
||||
if (file_exists($path ?? '')) {
|
||||
return json_decode(file_get_contents($path)) ?: new stdClass;
|
||||
}
|
||||
return new stdClass;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user