Make WordPress Core

Ticket #49889: 49889.5.diff

File 49889.5.diff, 1.4 KB (added by hellofromTonya, 4 years ago)

Changes test running constant from DIR_TESTDATA to WP_RUN_CORE_TESTS.

  • src/wp-admin/includes/image.php

    diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php
    index e64c49c4d1..56b9c0a36f 100644
    a b function wp_read_image_metadata( $file ) { 
    721721                if ( ! empty( $info['APP13'] ) ) {
    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.
    727727                                defined( 'WP_DEBUG' ) && WP_DEBUG
    function wp_read_image_metadata( $file ) { 
    792792        if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types, true ) ) {
    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.
    798798                        defined( 'WP_DEBUG' ) && WP_DEBUG
  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index b22e04f3e3..11b6fae7d1 100644
    a b function wp_show_heic_upload_error( $plupload_settings ) { 
    49754975function wp_getimagesize( $filename, &$imageinfo = array() ) {
    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.
    49814981                defined( 'WP_DEBUG' ) && WP_DEBUG