Skip to content

Commit

Permalink
Merge branch '2.4' into 2
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 2, 2023
2 parents ffe1bc8 + 8e3f71a commit 5c80700
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/TestSessionEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,10 @@ public function resetDatabaseName()
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;
}

/**
Expand Down

0 comments on commit 5c80700

Please sign in to comment.