Skip to content

Commit

Permalink
fix crash not repported when last error is null
Browse files Browse the repository at this point in the history
  • Loading branch information
ShockedPlot7560 authored Jul 9, 2024
1 parent 057bfa2 commit 4a0ec1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TestProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ public function stop() : void {
if (TestMemory::$currentTest !== null) {
global $lastExceptionError, $lastError;
$error = $lastExceptionError ?? $lastError;
TestResults::fatalTest(TestMemory::$currentTest, ServerCrashedException::fromArray($error));
if($error === null){
TestResults::fatalTest(TestMemory::$currentTest, new ServerCrashedException());
}else{
TestResults::fatalTest(TestMemory::$currentTest, ServerCrashedException::fromArray($error));
}
$this->finish(false);
}
}
Expand Down

0 comments on commit 4a0ec1d

Please sign in to comment.