Make WordPress Core


Ignore:
Timestamp:
10/03/2026 11:14:54 PM (8 days ago)
Author:
SergeyBiryukov
Message:

Code Quality: Remove an always-true check when scheduling a Customizer changeset.

In WP_Customize_Manager::save_changeset_post(), a changeset with a date_gmt that is not in the future is rejected with a not_future_date error.

The check that follows can therefore only be reached with $is_future_dated set to true, so the 'future' === $args['status'] || $is_future_dated part of its condition always evaluates to true. The condition is reduced to the is_theme_active() check that actually decides it. There is no change in behavior.

This resolves the only error in the booleanOr.rightAlwaysTrue PHPStan baseline, which is deleted.

Follow-up to r39409.

Props Soean, mukesh27.
See #65817.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpstan.neon.dist

    r63942 r64082  
    3535        - tests/phpstan/baselines/booleanOr.alwaysFalse.neon
    3636        - tests/phpstan/baselines/booleanOr.alwaysTrue.neon
    37         - tests/phpstan/baselines/booleanOr.rightAlwaysTrue.neon
    3837        - tests/phpstan/baselines/catch.neverThrown.neon
    3938        - tests/phpstan/baselines/class.notFound.neon
Note: See TracChangeset for help on using the changeset viewer.