Skip to:
Content

bbPress.org

Changeset 7251


Ignore:
Timestamp:
01/23/2024 02:34:37 AM (6 months ago)
Author:
johnjamesjacoby
Message:

Common Functions: fix dashboard errors from undefined variables.

Introduced in r7237, in bbp_get_statistics().

This corrects an unintended regression that was causing replies not to be counted correctly.

In branches/2.6, for 2.6.10.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/common/functions.php

    r7250 r7251  
    484484
    485485        // Declare empty arrays
    486         $topics = $topic_titles = array_fill_keys( bbp_get_non_public_reply_statuses(), '' );
     486        $replies = $reply_titles = array_fill_keys( bbp_get_non_public_reply_statuses(), '' );
    487487
    488488        // Pending
     
    517517
    518518        // Total hidden (pending, private, hidden, spam, trash)
    519         $reply_count_hidden = array_sum( $replies );
     519        $reply_count_hidden = array_sum( array_filter( $replies ) );
    520520
    521521        // Compile the hidden replies title
Note: See TracChangeset for help on using the changeset viewer.