Skip to content

Commit

Permalink
fix: broken spam count mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
florianbrinkmann committed Jun 2, 2023
1 parent 308702c commit e058830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Admin/DashboardWidgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function add_dashboard_count( $items = array() ) {
* @since 2.4
*/
private static function get_spam_count() {
$count = intval( Settings::get_option( 'spam_count' ) );
$count = intval( Settings::get_option( 'spam_count', '' ) );

return ( get_locale() === 'de_DE' ? number_format( $count, 0, '', '.' ) : number_format_i18n( $count ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/PostProcessors/UpdateSpamCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UpdateSpamCount extends Base {
protected static $slug = 'asb-update-spam-count';

public static function process( $item ) {
if ( ! Settings::get_option( Statistics::get_option_name( Statistics::DASHBOARD_COUNT_OPTION ) ) ) {
if ( ! Statistics::is_active() ) {
return $item;
}

Expand Down

0 comments on commit e058830

Please sign in to comment.