Skip to content

Commit

Permalink
Merge pull request #644 from Automattic/fix/phpunit-php8
Browse files Browse the repository at this point in the history
Fix test_story_budget_set_number_days_filter_invalid in PHP 8.0
  • Loading branch information
htdat committed Jun 1, 2021
2 parents 1770298 + 18bbba9 commit 2642a91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/story-budget/story-budget.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ public function update_user_filters_from_form_date_range_change( $current_user,
}

if ( isset( $new_filters['number_days'] ) ) {
$new_filters['number_days'] = intval( $new_filters['number_days'] );
if ( $new_filters['number_days'] <= 1 ) {
$existing_filters['number_days'] = 1;
} else {
Expand Down

0 comments on commit 2642a91

Please sign in to comment.