From ddf28757d2f26a66144b758099ef7fa867f8cc32 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2026 09:05:44 +0000 Subject: [PATCH] ref(frame-builder): Initialize $matches before preg_match to drop Mago baseline entry --- analysis-baseline.toml | 6 ------ src/FrameBuilder.php | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/analysis-baseline.toml b/analysis-baseline.toml index 155d7e3ca6..0516c5328f 100644 --- a/analysis-baseline.toml +++ b/analysis-baseline.toml @@ -270,12 +270,6 @@ code = "mixed-assignment" message = "Assigning `mixed` type to a variable may lead to unexpected behavior." count = 2 -[[issues]] -file = "src/FrameBuilder.php" -code = "reference-to-undefined-variable" -message = "Reference created from a previously undefined variable `$matches`." -count = 1 - [[issues]] file = "src/HttpClient/HttpClient.php" code = "deprecated-function" diff --git a/src/FrameBuilder.php b/src/FrameBuilder.php index c0c0d85646..913124a372 100644 --- a/src/FrameBuilder.php +++ b/src/FrameBuilder.php @@ -59,6 +59,8 @@ public function __construct(Options $options, RepresentationSerializerInterface */ public function buildFromBacktraceFrame(string $file, int $line, array $backtraceFrame): Frame { + $matches = []; + // The filename can be in any of these formats: // - // - () : eval()'d code