From 7d14d775ccf52e41af1efc686f30b913945464a2 Mon Sep 17 00:00:00 2001 From: Christian Heel <66922325+heelc29@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:14:35 +0200 Subject: [PATCH 1/2] [4.x] fix phpstan issue Negated boolean expression is always false --- src/InputFilter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/InputFilter.php b/src/InputFilter.php index ed60b0cc..f8aedf61 100644 --- a/src/InputFilter.php +++ b/src/InputFilter.php @@ -382,13 +382,13 @@ protected function cleanTags($source) } /* - * Exclude all "non-regular" tagnames - * OR no tagname + * No tagname + * OR exclude all "non-regular" tagnames * OR remove if xssauto is on and tag is blocked */ if ( - (!preg_match('/^[a-z][a-z0-9]*$/i', $tagName)) - || (!$tagName) + (!$tagName) + || (!preg_match('/^[a-z][a-z0-9]*$/i', $tagName)) || ((\in_array(strtolower($tagName), $this->blockedTags)) && $this->xssAuto) ) { $postTag = substr($postTag, ($tagLength + 2)); From b61bea88c911283edbf6e0faa7570fa739a9278d Mon Sep 17 00:00:00 2001 From: Christian Heel <66922325+heelc29@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:01:06 +0200 Subject: [PATCH 2/2] Update phpstan-baseline.neon --- phpstan-baseline.neon | 6 ------ 1 file changed, 6 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 78094ae4..5578f462 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -17,9 +17,3 @@ parameters: identifier: function.alreadyNarrowedType count: 1 path: src/OutputFilter.php - - - - message: '#^Method Joomla\\Filter\\OutputFilter\:\:cleanText\(\) never assigns null to &\$text so it can be removed from the by\-ref type\.$#' - identifier: parameterByRef.unusedType - count: 1 - path: src/OutputFilter.php