Make WordPress Core


Ignore:
Timestamp:
02/02/2021 09:34:40 PM (6 years ago)
Author:
antpb
Message:

Media: Consistency in logic to pass wp_getimagesize() tests.

Previously, we used DIR_TESTDATA to determine if a test should skip a newly silenced error in wp_getimagesize().

We are now using WP_RUN_CORE_TESTS instead for consistency.

Props hellofromTonya, SergeyBiryukov.
See #49889.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r50146 r50170  
    722722                        if (
    723723                                // Skip when running unit tests.
    724                                 ! defined( 'DIR_TESTDATA' )
     724                                ! defined( 'WP_RUN_CORE_TESTS' )
    725725                                &&
    726726                                // Process without silencing errors when in debug mode.
     
    793793                if (
    794794                        // Skip when running unit tests.
    795                         ! defined( 'DIR_TESTDATA' )
     795                        ! defined( 'WP_RUN_CORE_TESTS' )
    796796                        &&
    797797                        // Process without silencing errors when in debug mode.
Note: See TracChangeset for help on using the changeset viewer.