Do not send data for 0 increment calls in wfIncrStats().
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 18 Jan 2013 18:26:54 +0000 (10:26 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 18 Jan 2013 18:26:54 +0000 (10:26 -0800)
Change-Id: I5f1ca83ad56e129b42a96a5c73ec42cd2d978901

includes/GlobalFunctions.php

index 0b1bd19..1593085 100644 (file)
@@ -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;