From 6832094f6c37b6c42484e10c8b64cc78aebe44c4 Mon Sep 17 00:00:00 2001 From: Federico Leva Date: Wed, 1 Jul 2015 14:27:55 +0200 Subject: [PATCH] Account for unset visiting watchers Followup to 09a21c4af8dd53644edd31fe731638b60f91594a Now with `|| $user->isAllowed( 'unwatchedpages' )` we can enter line 337 without having any count to show. Change-Id: I6826e1c59899d2c8cbbc6d079874d0d583f8783a --- includes/actions/InfoAction.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 6d43ec55b5..0c1a344864 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -328,7 +328,10 @@ class InfoAction extends FormlessAction { $this->msg( 'pageinfo-watchers' ), $lang->formatNum( $pageCounts['watchers'] ) ); - if ( $config->get( 'ShowUpdatedMarker' ) ) { + if ( + $config->get( 'ShowUpdatedMarker' ) && + isset( $pageCounts['visitingWatchers'] ) + ) { $minToDisclose = $config->get( 'UnwatchedPageSecret' ); if ( $pageCounts['visitingWatchers'] > $minToDisclose || $user->isAllowed( 'unwatchedpages' ) ) { -- 2.20.1