Skip to content

Commit

Permalink
Minor adjustments to counting function
Browse files Browse the repository at this point in the history
  • Loading branch information
gudmdharalds committed Apr 26, 2018
1 parent 98dab1f commit 2e73972
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,16 +569,15 @@ function vipgoci_counter_report( $action = null, $type = null, $amount = 1 ) {


/*
* Being asked to either start
* Being asked to start
* collecting, act on that.
*/

if ( ! isset( $counters[ $type ] ) ) {
$counters[ $type ] = 0;
}


if ( 'do' === $action ) {
if ( ! isset( $counters[ $type ] ) ) {
$counters[ $type ] = 0;
}

$counters[ $type ] += $amount;

return true;
Expand Down

0 comments on commit 2e73972

Please sign in to comment.