Merge branch '2' into 3

This commit is contained in:
Steve Boyd 2023-02-03 10:34:16 +13:00
commit 521e84a93b
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
/**