CrashDump: fixed empty elements in lastError trace

as shown by #6010
This commit is contained in:
Dylan K. Taylor 2023-09-06 11:24:08 +01:00
parent a0c7587b68
commit 690ee4c574
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -206,6 +206,7 @@ class CrashDump{
if(isset($lastError)){
$this->data->lastError = $lastError;
$this->data->lastError["message"] = mb_scrub($this->data->lastError["message"], 'UTF-8');
$this->data->lastError["trace"] = array_map(array: $lastError["trace"], callback: fn(ThreadCrashInfoFrame $frame) => $frame->getPrintableFrame());
}
$this->data->error = $error;