mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-06-17 02:01:32 +02: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…
Reference in New Issue
Block a user