Skip to content

Commit

Permalink
Merge branch '2' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 2, 2023
2 parents 940ef6c + 5c80700 commit 521e84a
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 @@ -528,7 +528,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 521e84a

Please sign in to comment.