Skip to content

Commit d844b98

Browse files
committed
Filter null bytes from trace due to anon class. This leads to a crash when using jsonb.
1 parent 23a6b51 commit d844b98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Subscription/ThrowableToErrorContextTransformer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ private static function transformThrowable(Throwable $error): array
7070
*/
7171
private static function transformTrace(array $trace): array
7272
{
73+
if (array_key_exists('class', $trace) && is_string($trace['class'])) {
74+
$trace['class'] = str_replace("\x00", '', $trace['class']);
75+
}
76+
7377
if (!array_key_exists('args', $trace)) {
7478
return $trace;
7579
}

0 commit comments

Comments
 (0)