Changeset 50148
- Timestamp:
- 02/02/2021 05:08:48 PM (4 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r50146 r50148 7867 7867 return abs( (float) $expected - (float) $actual ) <= $precision; 7868 7868 } 7869 7870 /**7871 * Allows PHP's getimagesize() to be debuggable when necessary.7872 *7873 * @since 5.7.07874 *7875 * @param string $filename The file path.7876 * @param array $imageinfo Extended image information, passed by reference.7877 * @return array|false Array of image information or false on failure.7878 */7879 function wp_getimagesize( $filename, &$imageinfo = array() ) {7880 if (7881 // Skip when running unit tests.7882 ! defined( 'DIR_TESTDATA' )7883 &&7884 // Return without silencing errors when in debug mode.7885 defined( 'WP_DEBUG' ) && WP_DEBUG7886 ) {7887 return getimagesize( $filename, $imageinfo );7888 }7889 7890 /**7891 * Silencing notice and warning is intentional.7892 *7893 * getimagesize() has a tendency to generate errors, such as "corrupt JPEG data: 7191 extraneous bytes before7894 * marker", even when it's able to provide image size information.7895 *7896 * See https://core.trac.wordpress.org/ticket/424807897 *7898 * phpcs:ignore WordPress.PHP.NoSilencedErrors7899 */7900 return @getimagesize( $filename, $imageinfo );7901 } -
trunk/src/wp-includes/media.php
r50146 r50148 1629 1629 1630 1630 /** 1631 * Filter the 'wp_image_src_get_dimensions' value.1631 * Filter 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 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998
Note: See TracChangeset
for help on using the changeset viewer.