From ab74e58f5df50d99f0524f5cd69a021a59970aba Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Tue, 18 Jun 2024 11:19:02 +0200 Subject: [PATCH] Fix --- src/Command/FixerApplication.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Command/FixerApplication.php b/src/Command/FixerApplication.php index 1b8590ee99..eeab297a72 100644 --- a/src/Command/FixerApplication.php +++ b/src/Command/FixerApplication.php @@ -488,17 +488,19 @@ private function analyse( if ($e instanceof ProcessCrashedException) { $message = 'Analysis crashed'; - $trace = $e->getMessage(); + $traceAsString = $e->getMessage(); + $trace = []; } else { $message = $e->getMessage(); - $trace = $e->getTraceAsString(); + $traceAsString = $e->getTraceAsString(); + $trace = InternalError::prepareTrace($e); } $phpstanFixerEncoder->write(['action' => 'analysisCrash', 'data' => [ 'internalErrors' => [new InternalError( $message, 'running PHPStan Pro worker', - InternalError::prepareTrace($e), $trace, + $traceAsString, false, )], ]]);