diff --git a/wp-includes/media.php b/wp-includes/media.php index 86e8ac221f..89b972603b 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -4987,7 +4987,11 @@ function wp_getimagesize( $filename, array &$image_info = null ) { // Return without silencing errors when in debug mode. defined( 'WP_DEBUG' ) && WP_DEBUG ) { - return getimagesize( $filename, $image_info ); + if ( 2 === func_num_args() ) { + return getimagesize( $filename, $image_info ); + } else { + return getimagesize( $filename ); + } } /* @@ -4998,8 +5002,12 @@ function wp_getimagesize( $filename, array &$image_info = null ) { * even when it's able to provide image size information. * * See https://core.trac.wordpress.org/ticket/42480 - * - * phpcs:ignore WordPress.PHP.NoSilencedErrors */ - return @getimagesize( $filename, $image_info ); + if ( 2 === func_num_args() ) { + // phpcs:ignore WordPress.PHP.NoSilencedErrors + return @getimagesize( $filename, $image_info ); + } else { + // phpcs:ignore WordPress.PHP.NoSilencedErrors + return @getimagesize( $filename ); + } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5aa8a0d3a4..503a0b0100 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50585'; +$wp_version = '5.8-alpha-50586'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.