WordPress.org

Make WordPress Core

Changeset 50170


Ignore:
Timestamp:
02/02/2021 09:34:40 PM (9 months 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.

Location:
trunk/src
Files:
2 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.
  • trunk/src/wp-includes/media.php

    r50152 r50170  
    49764976    if (
    49774977        // Skip when running unit tests.
    4978         ! defined( 'DIR_TESTDATA' )
     4978        ! defined( 'WP_RUN_CORE_TESTS' )
    49794979        &&
    49804980        // Return without silencing errors when in debug mode.
Note: See TracChangeset for help on using the changeset viewer.