Changeset 50148 for trunk/src/wp-includes/media.php
- Timestamp:
- 02/02/2021 05:08:48 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r50146 r50148 1629 1629 1630 1630 /** 1631 * Filter the 'wp_image_src_get_dimensions' value.1631 * Filters the 'wp_image_src_get_dimensions' value. 1632 1632 * 1633 1633 * @since 5.7.0 … … 4963 4963 return $plupload_settings; 4964 4964 } 4965 4966 /** 4967 * Allows PHP's getimagesize() to be debuggable when necessary. 4968 * 4969 * @since 5.7.0 4970 * 4971 * @param string $filename The file path. 4972 * @param array $imageinfo Extended image information, passed by reference. 4973 * @return array|false Array of image information or false on failure. 4974 */ 4975 function wp_getimagesize( $filename, &$imageinfo = array() ) { 4976 if ( 4977 // Skip when running unit tests. 4978 ! defined( 'DIR_TESTDATA' ) 4979 && 4980 // Return without silencing errors when in debug mode. 4981 defined( 'WP_DEBUG' ) && WP_DEBUG 4982 ) { 4983 return getimagesize( $filename, $imageinfo ); 4984 } 4985 4986 /* 4987 * Silencing notice and warning is intentional. 4988 * 4989 * getimagesize() has a tendency to generate errors, such as 4990 * "corrupt JPEG data: 7191 extraneous bytes before marker", 4991 * even when it's able to provide image size information. 4992 * 4993 * See https://core.trac.wordpress.org/ticket/42480 4994 * 4995 * phpcs:ignore WordPress.PHP.NoSilencedErrors 4996 */ 4997 return @getimagesize( $filename, $imageinfo ); 4998 }
Note: See TracChangeset
for help on using the changeset viewer.