Use a local variable for hitcount in AbuseFilterViewEdit

Assist static code analyzer that null is not passed to
Message::numParams

Change-Id: Ic0369493b274de3379067745573e1f8baed56dcb
This commit is contained in:
Umherirrender 2024-10-26 21:41:16 +02:00
parent 63de22357d
commit a02fe0a2dd

View file

@ -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,