From 3943a73e21a64e1af20e21141b09ccdc0da0fb6c Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 18 Jan 2013 10:26:54 -0800 Subject: [PATCH] Do not send data for 0 increment calls in wfIncrStats(). Change-Id: I5f1ca83ad56e129b42a96a5c73ec42cd2d978901 --- includes/GlobalFunctions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0b1bd19acc..1593085aef 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1235,11 +1235,15 @@ function wfLogProfilingData() { * * @param $key String * @param $count Int + * @return void */ function wfIncrStats( $key, $count = 1 ) { global $wgStatsMethod; $count = intval( $count ); + if ( $count == 0 ) { + return; + } if( $wgStatsMethod == 'udp' ) { global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgAggregateStatsID; -- 2.20.1