Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta committed Sep 23, 2024
1 parent afd8245 commit 1426e9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions projects/packages/waf/src/class-waf-blocklog-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ private static function write_all_time_block_count_row( int $value ) {
* @return void
*/
private static function write_all_time_block_count() {
$block_count = self::get_all_time_block_count_value() ?? self::get_default_all_time_stat_value();
$block_count = self::get_all_time_block_count_value();
if ( ! $block_count ) {
$block_count = self::get_default_all_time_stat_value();
}

self::write_all_time_block_count_row( $block_count + 1 );
}

Expand Down Expand Up @@ -369,7 +373,7 @@ private static function get_default_all_time_stat_value() {
}
}

return $all_time_block_count;
return intval( $all_time_block_count );
}

/**
Expand Down

0 comments on commit 1426e9b

Please sign in to comment.