From a43432b0d376be3708cdc6a07273afca240cfa73 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2026 09:08:00 +0000 Subject: [PATCH] ref(frame-builder): Compare prefixes to an empty array to drop Mago baseline entry --- analysis-baseline.toml | 6 ------ src/FrameBuilder.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/analysis-baseline.toml b/analysis-baseline.toml index 6d1f27e19..bd76e3ded 100644 --- a/analysis-baseline.toml +++ b/analysis-baseline.toml @@ -240,12 +240,6 @@ code = "impossible-condition" message = "This condition (type `false`) will always evaluate to false." count = 1 -[[issues]] -file = "src/FrameBuilder.php" -code = "invalid-operand" -message = "Right operand in `&&` operation is an `array`." -count = 1 - [[issues]] file = "src/FrameBuilder.php" code = "mixed-assignment" diff --git a/src/FrameBuilder.php b/src/FrameBuilder.php index 913124a37..d6bf04a83 100644 --- a/src/FrameBuilder.php +++ b/src/FrameBuilder.php @@ -95,7 +95,7 @@ public function buildFromBacktraceFrame(string $file, int $line, array $backtrac } // Starting with PHP 8.4 a closure function call is reported as "{closure:filename:line}" instead of just "{closure}", properly strip the prefixes from that format - if (\PHP_VERSION_ID >= 80400 && $functionName !== null && $this->options->getPrefixes()) { + if (\PHP_VERSION_ID >= 80400 && $functionName !== null && $this->options->getPrefixes() !== []) { $prefixStrippedFunctionName = preg_replace_callback('/^\{closure:(.*?):(\d+)}$/', function (array $matches) { return '{closure:' . $this->stripPrefixFromFilePath($this->options, $matches[1]) . ':' . $matches[2] . '}'; }, $functionName);