mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@50170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -721,7 +721,7 @@ function wp_read_image_metadata( $file ) {
|
||||
if ( ! empty( $info['APP13'] ) ) {
|
||||
if (
|
||||
// Skip when running unit tests.
|
||||
! defined( 'DIR_TESTDATA' )
|
||||
! defined( 'WP_RUN_CORE_TESTS' )
|
||||
&&
|
||||
// Process without silencing errors when in debug mode.
|
||||
defined( 'WP_DEBUG' ) && WP_DEBUG
|
||||
@@ -792,7 +792,7 @@ function wp_read_image_metadata( $file ) {
|
||||
if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types, true ) ) {
|
||||
if (
|
||||
// Skip when running unit tests.
|
||||
! defined( 'DIR_TESTDATA' )
|
||||
! defined( 'WP_RUN_CORE_TESTS' )
|
||||
&&
|
||||
// Process without silencing errors when in debug mode.
|
||||
defined( 'WP_DEBUG' ) && WP_DEBUG
|
||||
|
||||
@@ -4975,7 +4975,7 @@ function wp_show_heic_upload_error( $plupload_settings ) {
|
||||
function wp_getimagesize( $filename, &$imageinfo = array() ) {
|
||||
if (
|
||||
// Skip when running unit tests.
|
||||
! defined( 'DIR_TESTDATA' )
|
||||
! defined( 'WP_RUN_CORE_TESTS' )
|
||||
&&
|
||||
// Return without silencing errors when in debug mode.
|
||||
defined( 'WP_DEBUG' ) && WP_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user