Make WordPress Core


Ignore:
Timestamp:
10/05/2026 02:15:23 PM (6 days ago)
Author:
SergeyBiryukov
Message:

Code Quality: Remove redundant isset( $imagick ) check in WP_Debug_Data.

When Site Health debug data was introduced, $imagick was instantiated conditionally inside class_exists( 'Imagick' ). This commit ensures that the variable is always defined and removes a redundant isset( $imagick ) check in favor of a more specific and future-proof $imagick instanceof Imagick check.

This resolves the only error in the instanceof.alwaysTrue PHPStan baseline, which is deleted.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/13977.

Follow-up to r44986.

Props huzaifaalmesbah.
See #65817.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpstan.neon.dist

    r64082 r64094  
    4949        - tests/phpstan/baselines/if.alwaysFalse.neon
    5050        - tests/phpstan/baselines/if.alwaysTrue.neon
    51         - tests/phpstan/baselines/instanceof.alwaysTrue.neon
    5251        - tests/phpstan/baselines/isset.offset.neon
    5352        - tests/phpstan/baselines/isset.property.neon
Note: See TracChangeset for help on using the changeset viewer.