From a02fe0a2dd15826f120fd50c6d2fac7c2003401a Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 26 Oct 2024 21:41:16 +0200 Subject: [PATCH] Use a local variable for hitcount in AbuseFilterViewEdit Assist static code analyzer that null is not passed to Message::numParams Change-Id: Ic0369493b274de3379067745573e1f8baed56dcb --- includes/View/AbuseFilterViewEdit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/View/AbuseFilterViewEdit.php b/includes/View/AbuseFilterViewEdit.php index 20b14498b..0db1e5b98 100644 --- a/includes/View/AbuseFilterViewEdit.php +++ b/includes/View/AbuseFilterViewEdit.php @@ -373,9 +373,10 @@ class AbuseFilterViewEdit extends AbuseFilterView { } // Hit count display - if ( $filterObj->getHitCount() !== null && $this->afPermManager->canSeeLogDetails( $user ) ) { + $hitCount = $filterObj->getHitCount(); + if ( $hitCount !== null && $this->afPermManager->canSeeLogDetails( $user ) ) { $count_display = $this->msg( 'abusefilter-hitcount' ) - ->numParams( $filterObj->getHitCount() )->text(); + ->numParams( $hitCount )->text(); $hitCount = $this->linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'AbuseLog' ), $count_display,